<?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-7379993593392712404</id><updated>2011-11-03T05:33:42.306-07:00</updated><category term='sophsec'/><title type='text'>graduated script kiddie</title><subtitle type='html'>dr.raid's rants on hacking, information security, and the whoring of talent that occurs therein.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-1359269114683265898</id><published>2010-01-13T14:04:00.000-08:00</published><updated>2010-01-15T13:57:19.246-08:00</updated><title type='text'>Myths of Security</title><content type='html'>I recently got myself a copy of Myths of Security written by John Viega, and am honestly impressed; so much so that I decided to blog about it. Not that I expected unimpressive work from John, I am just usually unhappy with books unless they break out they assembly and topsy krett 0dayz; although this book isn't super technical, it is definitely awesome. With short, entertaining chapters, John takes a head on approach to addressing the bullshit in the security industry (win!!!) by discussing it with language that is technical enough to be enjoyable by geeks, but non-technical enough to be understood by the masses. This is really a shining point of the book: by speaking to both audiences, he bridges and explains the frustrations from both sides in understandable terms. You can seriously recommend this book to your parents to help them understand why you have screaming fits whenever the local news mentions anything about hacking; he holds no punches calling out any part of the security industry, and the end-users it sells to. He calls out AV, HIPS, HTTPS, and even Apple fan boys (win+1!). After exposing all the snake oil, he then follows through with some sincere, candid suggestions that truly aim to secure users. Overall an awesome book.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-1359269114683265898?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/1359269114683265898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=1359269114683265898' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1359269114683265898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1359269114683265898'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2010/01/myths-of-security.html' title='Myths of Security'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-9201835311689611050</id><published>2009-08-10T11:34:00.000-07:00</published><updated>2009-08-10T11:35:07.378-07:00</updated><title type='text'>I WON TEH PWNIE!</title><content type='html'>I WON THE PWNIE FOR BEST SONG @ BLACKHAT 2009!! WOOT!&lt;br /&gt;&lt;br /&gt;I am very grateful! Thanks to my supporters, my friends, my fans and the Pwnie judges! I received a lot of positive feed back for the track throughout Blackhat and Defcon - I will be trying my very best to get some sort of recording setup out here to make more music.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-9201835311689611050?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/9201835311689611050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=9201835311689611050' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9201835311689611050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9201835311689611050'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/08/i-won-teh-pwnie.html' title='I WON TEH PWNIE!'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-7403706042160245915</id><published>2009-07-22T06:45:00.000-07:00</published><updated>2009-07-22T06:48:24.026-07:00</updated><title type='text'>Nice Report</title><content type='html'>I am nominated for the &lt;a href="http://pwnie-awards.org/2009/"&gt;Pwnie Awards&lt;/a&gt; again this year for my song &lt;a href="http://sophsec.com/#nicereport"&gt;Nice Report&lt;/a&gt;. I'm really excited and hope I win, although not having a video to submit seems pretty detrimental after last years winner :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-7403706042160245915?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/7403706042160245915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=7403706042160245915' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/7403706042160245915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/7403706042160245915'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/07/nice-report.html' title='Nice Report'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3082387059625681668</id><published>2009-07-10T19:24:00.000-07:00</published><updated>2009-07-10T20:05:04.479-07:00</updated><title type='text'>time(), GCC, and the linker</title><content type='html'>While debugging some of my own crappy code I discovered a bug that I thought was interesting. If Kenshoto were to have hosted the game again this year, I think this may have been a fun bug to stage in a vulnerable CTF service. (Actually, I vaguely remember talking to someone who did this years quals who said that there were some "cute bugs that involved clever timing" -- it is very possible it was of the same nature.)&lt;br /&gt;&lt;br /&gt;Long story short: if there is an implicit declaration of a function because a header file wasn't included, GCC will warn about the implicit use but allow it. Without the header, GCC doesn't know the expected arguments or return value of the function (logically, it has no prototypes to reference). If the linker can find the function being used, it is linked to during that step. &lt;br /&gt;&lt;br /&gt;Consider this contrived and barely functional code sample: &lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#55cc66;background:#001800;'&gt;&lt;span style='color:#004a43; '&gt;#&lt;/span&gt;&lt;span style='color:#004a43; '&gt;include &lt;/span&gt;&lt;span style='color:#800000; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#ffffffff; '&gt;stdio.h&lt;/span&gt;&lt;span style='color:#800000; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#004a43; '&gt;#&lt;/span&gt;&lt;span style='color:#004a43; '&gt;include &lt;/span&gt;&lt;span style='color:#800000; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#ffffffff; '&gt;string.h&lt;/span&gt;&lt;span style='color:#800000; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#004a43; '&gt;#&lt;/span&gt;&lt;span style='color:#004a43; '&gt;include &lt;/span&gt;&lt;span style='color:#800000; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#ffffffff; '&gt;unistd.h&lt;/span&gt;&lt;span style='color:#800000; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#004a43; '&gt;#&lt;/span&gt;&lt;span style='color:#004a43; '&gt;include &lt;/span&gt;&lt;span style='color:#800000; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#ffffffff; '&gt;stdlib.h&lt;/span&gt;&lt;span style='color:#800000; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt; &lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#808030; '&gt;*&lt;/span&gt;fp&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt; handle_error&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    printf&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#cc5555; '&gt;you're doing it wrong&lt;/span&gt;&lt;span style='color:#aa3333; font-weight:bold; '&gt;\n&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt; handle200&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    printf&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#cc5555; '&gt;you're still not doing it right&lt;/span&gt;&lt;span style='color:#aa3333; font-weight:bold; '&gt;\n&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;void&lt;/span&gt; setvalue&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;int&lt;/span&gt; x&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#508050; font-weight:bold; '&gt;if&lt;/span&gt; &lt;span style='color:#808030; '&gt;(&lt;/span&gt;x &lt;span style='color:#808030; '&gt;=&lt;/span&gt;&lt;span style='color:#808030; '&gt;=&lt;/span&gt; &lt;span style='color:#778c77; '&gt;200&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;        fp &lt;span style='color:#808030; '&gt;=&lt;/span&gt; handle200&lt;span style='color:#800080; '&gt;;&lt;/span&gt;    &lt;br /&gt;    &lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#508050; font-weight:bold; '&gt;else&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;        fp &lt;span style='color:#808030; '&gt;=&lt;/span&gt; handle_error&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;int&lt;/span&gt; &lt;span style='color:#ffffffff; '&gt;main&lt;/span&gt;&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#508050; font-weight:bold; '&gt;int&lt;/span&gt; argc&lt;span style='color:#808030; '&gt;,&lt;/span&gt; &lt;span style='color:#508050; font-weight:bold; '&gt;char&lt;/span&gt; &lt;span style='color:#808030; '&gt;*&lt;/span&gt;argv&lt;span style='color:#808030; '&gt;[&lt;/span&gt;&lt;span style='color:#808030; '&gt;]&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    time_t mytime&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#508050; font-weight:bold; '&gt;int&lt;/span&gt; x&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#603000; '&gt;size_t&lt;/span&gt; bufsize &lt;span style='color:#808030; '&gt;=&lt;/span&gt; &lt;span style='color:#778c77; '&gt;65&lt;/span&gt; &lt;span style='color:#808030; '&gt;*&lt;/span&gt; &lt;span style='color:#778c77; '&gt;1024&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#508050; font-weight:bold; '&gt;char&lt;/span&gt; &lt;span style='color:#808030; '&gt;*&lt;/span&gt;buf&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    buf &lt;span style='color:#808030; '&gt;=&lt;/span&gt; malloc&lt;span style='color:#808030; '&gt;(&lt;/span&gt;bufsize&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    memset&lt;span style='color:#808030; '&gt;(&lt;/span&gt;buf&lt;span style='color:#808030; '&gt;,&lt;/span&gt; &lt;span style='color:#778c77; '&gt;0&lt;/span&gt;&lt;span style='color:#808030; '&gt;,&lt;/span&gt; &lt;span style='color:#508050; font-weight:bold; '&gt;sizeof&lt;/span&gt;&lt;span style='color:#808030; '&gt;(&lt;/span&gt;buf&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    fgets&lt;span style='color:#808030; '&gt;(&lt;/span&gt;buf&lt;span style='color:#808030; '&gt;,&lt;/span&gt; bufsize&lt;span style='color:#808030; '&gt;-&lt;/span&gt;&lt;span style='color:#778c77; '&gt;1&lt;/span&gt;&lt;span style='color:#808030; '&gt;,&lt;/span&gt; &lt;span style='color:#603000; '&gt;stdin&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    x &lt;span style='color:#808030; '&gt;=&lt;/span&gt; atoi&lt;span style='color:#808030; '&gt;(&lt;/span&gt;buf&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    setvalue&lt;span style='color:#808030; '&gt;(&lt;/span&gt;x&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    mytime &lt;span style='color:#808030; '&gt;=&lt;/span&gt; time&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    printf&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#cc5555; '&gt;my time is &lt;/span&gt;&lt;span style='color:#aa3333; font-weight:bold; '&gt;%u&lt;/span&gt;&lt;span style='color:#aa3333; font-weight:bold; '&gt;\n&lt;/span&gt;&lt;span style='color:#800000; '&gt;"&lt;/span&gt;&lt;span style='color:#808030; '&gt;,&lt;/span&gt; mytime&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    fp&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    free&lt;span style='color:#808030; '&gt;(&lt;/span&gt;buf&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#508050; font-weight:bold; '&gt;return&lt;/span&gt; &lt;span style='color:#778c77; '&gt;0&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There is no inclusion of time.h as required for the time function, but the code compiles and executes. If GCC is issuing warnings, during compilation it will say timebug.c:44: warning: implicit declaration of function ‘time’. &lt;br /&gt;&lt;br /&gt;I was an idiot for not having warnings enabled while compiling the code I was working on, it would have saved me tons of &lt;span style="font-style:italic;"&gt;time&lt;/span&gt; (u see wat i did there?)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The prototype for time() is: &lt;br /&gt;&lt;pre style='color:#d1d1d1;background:#000000;'&gt;time_t time&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;time_t &lt;span style='color:#d2cd86; '&gt;*&lt;/span&gt;t&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the action taken by time() is as follows:&lt;br /&gt;&lt;br /&gt;Get the time from the system.&lt;br /&gt;&lt;br /&gt;If the time_t pointer supplied as the only argument is not NULL, &lt;br /&gt;dereference it and store the time there. &lt;br /&gt;&lt;br /&gt;Return the time.&lt;br /&gt;&lt;br /&gt;In the code sample, since the last value pushed to the stack is the value passed to setvalue(), and as it still resides on the stack when time() is called, it is taken as the argument to time(). If the atoi() call on the buffer returns anything that is not 0 (aka NULL), then time() will treat it as a valid pointer, dereference and write the time to it. This wreaked havoc on my code as in my case, the last value to the stack was a structure pointer full of linked lists and things, and the bug didn't trigger until free() happened on those lists. Serious pain. &lt;br /&gt;&lt;br /&gt;Clever uses of this could be done to stage a fun CTF service. If an attacker had this vulnerable app to work with and a means of manipulating time (like a MITM of the Network Time Protocol), they could have a fun instant write-4-anywhere. Additionally, every 4.2 minutes the lower 8 bits of time rotates. Every 18.2 hours, the lower 16 bits rotates. By properly offsetting (say, only overwrite the high 16 bits of a function pointer/EIP) in conjunction with heap massaging or exploiting other application-specific traits, this bug could be fun ;]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-3082387059625681668?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3082387059625681668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3082387059625681668' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3082387059625681668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3082387059625681668'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/07/time-gcc-and-linker.html' title='time(), GCC, and the linker'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-9078973750656176121</id><published>2009-07-05T12:51:00.000-07:00</published><updated>2009-07-05T12:56:41.638-07:00</updated><title type='text'>MOAR POSTS</title><content type='html'>So I caved in and joined Twitter with all the other techno-hipsters. Apparently the security industry has a hard-on for a broken down over simplified version of web text irc. Yet still, it is a fun and efficient way to keep in immediate touch with friends and other interesting people. With my time being occupied by getting prepared to move, and tweeting, I haven't spent any time posting blog updates. I promise something interesting soon.&lt;br /&gt;&lt;br /&gt;For now, I'll just leave this here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.sophsec.com/images/crescendo.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 397px; height: 465px;" src="http://www.sophsec.com/images/crescendo.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-9078973750656176121?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/9078973750656176121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=9078973750656176121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9078973750656176121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9078973750656176121'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/07/moar-posts.html' title='MOAR POSTS'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4401198168255249594</id><published>2009-04-01T18:55:00.001-07:00</published><updated>2009-04-01T19:26:23.170-07:00</updated><title type='text'>This is what we needed.</title><content type='html'>My buddy Jeff said it best - this is what we needed: I TOLD YOU SO. &lt;br /&gt;&lt;br /&gt;Why does the media hype things like Conficker into terms such as "an unthinkable disaster". How is it unthinkable? Is Conficker going to leverage the technology of its compromised machines to transcend reality and do something beyond the scope of human comprehension? Is it going to build Skynet and go back in time looking for Sarah Conner? Is it going to use PC speakers to generate vibrations that manifest doom spores in the air that infect us and turn us into zombies? &lt;br /&gt;&lt;br /&gt;Sure it could fuck things up. It could delete everything on the infected machines. It could steal information. It could probably wreak DoS havoc in the internet. What's so special about this beyond any other worm of mass propagation? Nothing. It has some semi-clever components, it isn't as absolutely stupid as other worms, and it has an obsession with Rivest's aglorithms. OoOOoOo It must be the end of the world. &lt;br /&gt;&lt;br /&gt;So to everyone out there: I told you so. We're still alive. Congratulations on reliving y2k over a worm. Again don't get me wrong: it could cause a bunch of stress and rain on some parades. In fact it might still do something after April 1st. Is it worthy of the hype? Is it an unthinkable disaster? Certainly not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4401198168255249594?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4401198168255249594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4401198168255249594' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4401198168255249594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4401198168255249594'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/04/this-is-what-we-needed.html' title='This is what we needed.'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2132559226724369251</id><published>2009-03-26T03:19:00.000-07:00</published><updated>2009-03-26T04:07:54.127-07:00</updated><title type='text'>No Moar Free Hugz</title><content type='html'>This last week at information security conference CraqPipeWest, security researchers Dr.Raid, Postmodern, CD and Pierce have all decided to make and live by the following mantra:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;"NO MOAR FREE HUGZ"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This statement follows the annual conference's competition called Struggle2Snuggle, where in hackers compete to try and get as physically close as possible to girls who also attend the conferences. The contest works in 30 minute rounds, and at the end of each round the hacker who achieves the highest public display of physical interaction with a consenting female wins $50 cash for the round in addition to a free stick of AXE deodorant. The researchers were later quoted in interviews, after being asked about their views regarding the monetary value of hugs:&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style:italic;"&gt;No moar free hugz&lt;/span&gt; to me really means that these girls can't just expect to get a hug from me for free. I mean I spend time weaponizing my hugs - and I don't even really know what that means when I say it - &lt;span style="font-style:italic;"&gt;but it sounds cool&lt;/span&gt;. This isn't something I do to make other people money, so they shouldn't be making money off of me. If we're going to be spending time hugging these beautiful women, they should be paying us" - Dr. Raid, Chief of Substance Abuse at Portland based SophSec Research Labs&lt;br /&gt;&lt;br /&gt;"It's time that we recognize the effort that hackers have to put into being social like this. I don't smell good, and I bet you don't either. Do you think it's easy for us to hug women?" - Pierce, Manager of Useless Languages, SophSec Research Labs&lt;br /&gt;&lt;br /&gt;"Women just don't like getting a beard rubbed in their face." - PostModern, another SophSec member stated before being escorted out of the conference by security for throwing a beer bottle at another attendee wearing a 'Got Root?' shirt. &lt;br /&gt;&lt;br /&gt;"I'm actually not legally allowed to have contact with women who are not family, by court orders. This makes hugs really tough for me. Money is really the only thing that makes it worth the risk" - CD, Chief of Epic Lulz, SophSec Research Labs&lt;br /&gt;&lt;br /&gt;These views were clearly not held solely by SophSec members, as demonstrated by the crowd who started to cheer on as the contest progressed. It would appear as though Information Security Industry as a whole has been making a collaborative move towards selling hugs to vendors. As time progresses this may open up entire new market places for vendors to exist, and may even spark hope for revitalizing a broken economy. Until next issue, this is Fail Nobra, reporting for Fired Magazine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2132559226724369251?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2132559226724369251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2132559226724369251' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2132559226724369251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2132559226724369251'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/03/no-moar-free-hugz.html' title='No Moar Free Hugz'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-8305307291879439244</id><published>2009-03-16T14:36:00.000-07:00</published><updated>2009-03-24T14:20:25.011-07:00</updated><title type='text'>Nostalgia</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://la.gg/upl/iseewhatudid.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 438px; height: 440px;" src="http://la.gg/upl/iseewhatudid.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The IRC wars, the epic battles over the control for servers and the constant beef between hacker crews added fun to being involved in  security back in the 90s and early 2000s. Recently a friend linked me a &lt;a href="http://www.starik.ws/c1zc0.txt"&gt;monologue of ownage&lt;/a&gt; which brought me back memories of watching these types of wars happen back in the day. Having my name in the greetz also pretty nostalgic ;].&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-8305307291879439244?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/8305307291879439244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=8305307291879439244' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8305307291879439244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8305307291879439244'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/03/nostalgia.html' title='Nostalgia'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4672105829651755314</id><published>2009-03-12T17:10:00.001-07:00</published><updated>2009-03-12T17:14:56.415-07:00</updated><title type='text'>Google Native Client security contest</title><content type='html'>The Google Native Client (NaCl):&lt;br /&gt;&lt;br /&gt;"Native Client is an open-source research technology for running x86 native code in web applications, with the goal of maintaining the browser neutrality, OS portability, and safety that people expect from web apps. We've released this project at an early, research stage to get feedback from the security and broader open-source communities. We believe that Native Client technology will someday help web developers to create richer and more dynamic browser-based applications."&lt;br /&gt;&lt;br /&gt;A security contest is being held by Google to try and busticate their native client code. Some interesting &lt;a href="http://code.google.com/p/nativeclient/issues/list"&gt;submissions&lt;/a&gt; have already shown up on the issues list. Pretty impressive competition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4672105829651755314?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4672105829651755314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4672105829651755314' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4672105829651755314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4672105829651755314'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/03/google-native-client-security-contest.html' title='Google Native Client security contest'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-1081113331398745587</id><published>2009-02-02T16:11:00.000-08:00</published><updated>2009-02-02T16:13:16.044-08:00</updated><title type='text'>Real talk</title><content type='html'>xkcd is pretty good about hittin the point:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://imgs.xkcd.com/comics/security.png"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-1081113331398745587?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/1081113331398745587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=1081113331398745587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1081113331398745587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1081113331398745587'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2009/02/real-talk.html' title='Real talk'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-8161061990259001867</id><published>2008-12-23T14:56:00.000-08:00</published><updated>2008-12-23T15:36:14.197-08:00</updated><title type='text'>Dont know what you're talking about? Just make up a buzzword!</title><content type='html'>Blah Blah Blah, clearly indicative of a Kingpin attack, blah blah blah.&lt;br /&gt;&lt;br /&gt;Have you been following the news regarding voting machines being hacked to manipulate the 2004 Ohio elections? Did you catch the brand new sneaky unheard-of totally-0day w00t attack they used? Its called a "kingpin" attack; it works by inserting a computer to intercept and modify traffic between other systems. This is not to be confused with the known-about, popular, common, simple Man-In-The-Middle attack. Nope. This one is &lt;b&gt;completely different&lt;/b&gt;. The only similarities it shares with a MITM is EVERY-FUCKING-THING ABOUT IT.&lt;br /&gt;&lt;br /&gt;Why am I so upset? Consider this scenario:&lt;br /&gt;&lt;br /&gt;person&gt; ohai drraid. how are you?&lt;br /&gt;drraid&gt; hey! good. you?&lt;br /&gt;person&gt; gr8, what do you think about kingpin attacks?&lt;br /&gt;drraid&gt; never heard of it?&lt;br /&gt;person&gt; you haven't?&lt;br /&gt;person&gt; they used it to perform the hack on the '04 Ohio elections&lt;br /&gt;person&gt; what are you new or something?&lt;br /&gt;drraid&gt; i hate you.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mind you, it is very possible that the government just has some super secret term for MITM, and "kingpin" is just what intelligence agencies call it when they do this. Even if this were the case, it would be in their best interest to call it by its public name for the sake of public documents - otherwise they're disclosing their code names. But come on, let's be real - someone made up this term because he flat out didn't know better, was an avid &lt;b&gt;comic reader&lt;/b&gt;, and was fond of the idea &lt;a href="http://en.wikipedia.org/wiki/Kingpin_(comics)"&gt;that this guy&lt;/a&gt; was responsible for the voting hack.&lt;br /&gt;&lt;br /&gt;Now, this type of stupidity can't be stopped. So instead of trying to stop stupid people from making up stupid names, I've developed an entirely new stupid name scheme (I TOO CAN BE A STUPID PERSON!):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Buffer Overflows are now called &lt;a href="http://en.wikipedia.org/wiki/Juggernaut_(comics)"&gt;Juggernaut attacks.&lt;/a&gt; (I'M THE JUGGERNAUT BITCH!)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;All&lt;/b&gt; cryptographic weakness attacks are now called &lt;a href="http://en.wikipedia.org/wiki/Gambit_(comics)"&gt;Gambit attacks&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cross-site lameness attacks are now called &lt;a href="http://en.wikipedia.org/wiki/Sailor_Moon"&gt;Sailor Moon Episodes&lt;/a&gt;. I mean, attacks. Attacks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Until next time, sniff some glue or something because this place is too depressing without it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-8161061990259001867?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/8161061990259001867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=8161061990259001867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8161061990259001867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8161061990259001867'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/12/dont-know-what-youre-talking-about-just.html' title='Dont know what you&apos;re talking about? Just make up a buzzword!'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2051502615166342114</id><published>2008-11-13T13:20:00.000-08:00</published><updated>2009-03-24T16:51:03.236-07:00</updated><title type='text'>CTF Service Overview: GrimCreeper</title><content type='html'>Before it gets too far past Defcon, I've decided to post about a service that SophSec submitted to our homies in Kenshoto to use as a vulnerable service for Defcon's CTF. (For those unaware, Kenshoto is the group of 1337 hax0rs who manage the Capture-The-Flag competition - a pretty cool contest requiring real-world application exploitation skills)&lt;br /&gt;&lt;br /&gt;[This is a long winded post, I recommend getting your coffee now.]&lt;br /&gt;&lt;br /&gt;I was lucky enough to be involved in writing a vulnerable network service to be used during CTF for the teams to try and compromise. What I submitted was &lt;a href="http://www.sophsec.com/shards/c/grimcreeper.c"&gt;GrimCreeper&lt;/a&gt;, a piece of code with a pretty neat bug. Provided below is a basic run down on the service and an overview of the subtle yet devastating bug it contained.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Warning: Plot Sploiler] If you want to find the bug on your own, leave now [/Warning]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;This write-up assumes a scenario using 32bit x86 architecture.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;GrimCreeper is a simple network service, providing extremely basic (read: dumb) functionality to its users. Functionality includes a network echo service, time service, as well as a fortune like service returning a lie or a fact.&lt;br /&gt;&lt;br /&gt;GrimCreeper had several psuedo-bugs; that is, lines of code which are intentionally designed to look buggy but are not exploitable. The service also contained one real exploitable bug caused by a signedness issue during a size check, involving bit shifting. This ultimately results in a memory copy for a user-specified length into a stack buffer.&lt;br /&gt;&lt;br /&gt;This scenario is introduced by accepting a user-specified length variable for the copying of user-specified data. This isn't a typical signedness bug though. An example of a typical signedness bug could look like:&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;/* &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * return true if size is reasonable,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; *  return false if it is too big&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; some_check_function&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;size_t&lt;/span&gt; net_size&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; checksize &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; net_size&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;checksize &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; MAXBUFFERSIZE&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With checksize being a signed integer, when it is assigned the value of the (presumably, user-supplied) net_size it will be negative if the value in net_size is greater than 2^31 - 1. If checksize is negative, of course the 'if' statement will evaluate as less than the MAXBUFSIZE macro definition, which is also signed. This type of bug isn't as common anymore, as developers have gotten better about using uniform unsigned size types as well as performing signedness checks before/after assignment.&lt;br /&gt;&lt;br /&gt;A step up from this, GrimCreeper performs a size signedness check before handling the user-sizes for anything else. Consider the following code:&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * returns true if net_size is "safe",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * and can be assigned to a signed int&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * without causing it to be negative&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; check_signed_int&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;size_t&lt;/span&gt; net_size&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; x&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;~&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;x &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;net_size &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; x&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This check function can be used prior to the previous function to ensure that the size is not too big for a signed check. (I understand this is getting contrived, but it makes for a great bug setup :P). It is also not entirely unreasonable to consider that this type of code might be implemented in a real world program where mixing of type signedness occurs for size variables, such as in legacy applications/network protocols.&lt;br /&gt;&lt;br /&gt;The interesting thing here is that the same function fails when applied to datatypes smaller than int.  Consider the following code:&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * function is intended to return true&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * if net_size is "safe",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * and can be assigned to a signed short&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * without causing it to be negative&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; check_signed_short&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;short&lt;/span&gt; net_size&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;short&lt;/span&gt; x&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;~&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;x &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;net_size &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; x&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This function will always return true ("safe") for any value passed into it, and thus does not work to check if a large unsigned short will cause a signed short to be negative. Strangely, if the bit shifting in the above function is spaced over two lines, the function &lt;b&gt;does&lt;/b&gt; work properly and as expected. Observe the following:&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * returns true if net_size is "safe",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * and can be assigned to a signed short&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt; * without causing it to be negative&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(185, 105, 105);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; check_signed_short&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;short&lt;/span&gt; net_size&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;short&lt;/span&gt; x&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;~&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; x &lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;net_size &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; x&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(119, 140, 119);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Voila! The basis for the bug in GrimCreeper. The seemingly subtle visual difference between these two functions has a huge impact on their functionality. Now for the breakdown of how, why, and where this bug happens..&lt;br /&gt;&lt;br /&gt;By observing the binary generated by the compiler for each of these functions, the difference becomes apparent. The proper, working implementation of the function (using the shifts across two lines), results in the following binary output:&lt;br /&gt;...&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;movw   $&lt;span style="color: rgb(119, 140, 119);"&gt;0xffff&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;movzwl &lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;add    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;mov    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;movzwl &lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;shr    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;mov    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;... Seen above, the &lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;add   &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;&lt;/pre&gt; replaces (and acts the same as) the single shift left, and the &lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;shr    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;&lt;/pre&gt; represents the single shift right. The value resulting from these operations is 0x7fff, and is exactly as intended and expected. Now observe the binary generated by the single-line (and broken) version of the function:&lt;br /&gt;...&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;movw   $&lt;span style="color: rgb(119, 140, 119);"&gt;0xffff&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;movzwl &lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;add    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;sar    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;mov    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(119, 140, 119);"&gt;0xfffffffe&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;mov    &lt;span style="color: rgb(119, 140, 119);"&gt;0xffffffec&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;ebp&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;&lt;/pre&gt;...&lt;br /&gt;Similar to the previous function, the code uses an &lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;add  &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;&lt;/pre&gt; in place of the shift left. However, directly after this is a HUGE difference: a SAR. A SAR? &lt;i&gt;WTF IS A SAR?&lt;/i&gt; SAR is a Shift-Arithmetic-Right, and its action differs from a SHR in that SAR is intended to be used with signed values and retains the state of the signed-bit. This shows that the value is being treated as signed, even though it was specifically declared as unsigned.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;It should be noted, that when I first discovered this difference I paid no further attention to the assembly I had in front of me, and jumped directly to an incorrect conclusion. The use of the SAR (and thus treatment of an unsigned short as a signed value) in the single-line shifting had me convinced that this was the result of a compiler bug, and that GCC was generating faulty code. I discussed this difference and showed the C code to several sharp people who all drew the same conclusion as I did. Big thanks and props to Mark Dowd for pointing out what was actually happening.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The cause for this difference is an integral promotion of the unsigned short to a signed integer. This happens because in C &lt;b&gt;every operation on a primitive type that is smaller than an integer results in that type being promoted a signed-integer for that operation, regardless of that original type's signedness.&lt;/b&gt; In the case of the shifting happening in two lines, the separation between lines allows for the type be demoted back to a 16 bit value. In the single line instance, the value is maintained in its promoted state, and thus results in a different value. Here is a breakdown of what is actually happening in the single-line example:&lt;br /&gt;&lt;br /&gt;1. The value for all 16 bits being set (0xffff) is being stored in 32 bit register %eax.&lt;br /&gt;2. %eax is then doubled via: &lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;add    &lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;%&lt;/span&gt;eax&lt;br /&gt;&lt;/pre&gt; This represents the shift-left. The resulting value in %eax is 0x01fffe.&lt;br /&gt;3. A Shift-Arithmetic-Right is then performed on %eax, returning the value back to 0xffff. The value of the lower 16 bits of %eax, stored in %ax, is then placed on the stack. Ultimately for the size-check routine, the value resulting from this is always going to be 0xffff.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusions and Notes:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I. It is interesting to note that although SAR works differently than SHR, in this case it doesn't matter. The only real significance to SAR %eax being present is that it illustrates that the value is being treated as a signed integer - but since the signed-bit is not set, a SHR in place of that SAR would act the same.&lt;br /&gt;&lt;br /&gt;II. During CTF the code for GrimCreeper was provided to the teams as a trick. This was intended to foster a code audit instead of the traditional reverse engineering or fuzzing. The idea was that without an in depth understanding of C and its integral promotion, this vulnerability is very difficult to spot. It truly stands in support of the belief that some vulnerabilities are easier to spot in assembly rather than  source.&lt;br /&gt;&lt;br /&gt;III. There are hints provided within the source code and the network responses by GrimCreeper which are meant to help teams find the vulnerability; these hints are flawed (accidentally) as they were written while I still believed this to be a compiler bug.&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://www.wiretrip.net/"&gt;friend&lt;/a&gt; pointed out a much sneakier way of introducing this vulnerability through obfuscation. In the original source code for GrimCreeper there are multiple functions for checking different typed size variables: one for unsigned integers, and one for unsigned shorts. This separation might warrant extra attention, as it appears quite suspect. By making a single &lt;code&gt;#define&lt;/code&gt; macro to perform the shifting, the code is a lot cleaner and it becomes even less intuitive that the behavior of the shifting will change with different types:&lt;br /&gt;&lt;pre style="background: rgb(0, 24, 0) none repeat scroll 0% 0%; color: rgb(85, 204, 102); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;define&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; STRIP_HIGH_BIT&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;var&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;  var &lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;var&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;void&lt;/span&gt; func&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;short&lt;/span&gt; s&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(80, 128, 80); font-weight: bold;"&gt;int&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; STRIP_HIGH_BIT&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; STRIP_HIGH_BIT&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;s&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This would likely warrant less attention, and make the bug yet even harder to find, even to a seasoned auditor.&lt;br /&gt;&lt;br /&gt;IV. Finally, as I am sure an astute programmer would have noticed, the use of two shifts to achieve this task is redundant. The check is easily performed using only one shift without introducing the bug. I initially discovered this bug during a real code review, and investigated it after wondering if there was any significance to the use of two shifts that wouldn't have been achieved with just one. I am under the belief that two shifts were used in the original code  as a safety mechanism, in order to maintain the value of the highest bit, possibly as an old school assembly best-practice. Of course, it may have just been a mistake. Either way, without two shifts there'd be no bug, and no GrimCreeper.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2051502615166342114?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2051502615166342114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2051502615166342114' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2051502615166342114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2051502615166342114'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/11/ctf-service-overview-grimcreeper.html' title='CTF Service Overview: GrimCreeper'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2480992682479696575</id><published>2008-11-06T08:07:00.001-08:00</published><updated>2008-11-06T08:09:43.634-08:00</updated><title type='text'>Crypto Cracking</title><content type='html'>The NSA may or may not be able to crack your password, but the the Turkish police can almost always crack your fingers.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://news.cnet.com/8301-13739_3-10069776-46.html"&gt;Crypto key beaten out of suspect&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2480992682479696575?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2480992682479696575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2480992682479696575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2480992682479696575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2480992682479696575'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/11/crypto-cracking.html' title='Crypto Cracking'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-1232879647360062399</id><published>2008-10-16T16:11:00.000-07:00</published><updated>2009-01-21T15:40:48.466-08:00</updated><title type='text'>I got Ownd.</title><content type='html'>By a &lt;b&gt;CPHFDoS Attack&lt;/b&gt;: Cross-Person-High-Five Denial-of-Service Attack. &lt;a href="http://houseofpostmodern.blogspot.com"&gt;PostModern&lt;/a&gt; did this to me. It works like:&lt;br /&gt;&lt;br /&gt;"heeey, up high, ooooooh sucker"&lt;br /&gt;&lt;br /&gt;The lesson to be learned here: any cross-anything-anything attack can happen at anytime, to anyone. Anywhere. Always.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-1232879647360062399?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/1232879647360062399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=1232879647360062399' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1232879647360062399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1232879647360062399'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/10/dont-stop-there.html' title='I got Ownd.'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3609965383029438472</id><published>2008-10-12T19:29:00.000-07:00</published><updated>2008-10-13T16:52:56.774-07:00</updated><title type='text'>st0ck hacking</title><content type='html'>Stock market manipulation has always been one of those sweet sexy movie-esque types of hacking. It grants hackers the financial gain, the international news props, and of course the power trip (ZOMG I R LEET!). Now that the economy is in the poop bucket, it looks like it might be manifesting - what an ideal time!&lt;br /&gt;&lt;a href="http://www.usnews.com/blogs/new-money/2008/10/01/googles-out-of-this-world-stock-drop-a-fluke.html"&gt;&lt;br /&gt;Late September, Google stock plummets after NASDAQ "fluke". &lt;/a&gt; What happened here? A glitch in the system resulting in massive amounts of requests for Google stock at a price much lower than it was selling for? Smells funny.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://online.wsj.com/article/SB122100794359017593.html?mod=googlenews_wsj"&gt;An undated article from 2002 reaches Tribune's most popular list, leading to indexing by Google news, and ultimately resulting in the drop of United Airline's stock.&lt;/a&gt; Here we have an article discussing United Airline's potential bankruptcy, but from 2002. The article being undated meant that new viewers were unaware that it was not recent information. After being picked up by other news media sources, all it took was commentary by someone popular in the financial market - and BOOM, stock plummets. I'm not going to make any preposterous claims, like that a 5 line shell script running wget + proxy could have made this article rise to the top viewed list ultimately causing all of this, but it is interesting to think about. &lt;br /&gt;&lt;br&gt;&lt;br /&gt;Finally, and not unheard of in previous mishaps, Yahoo! Finance misreported the Dow last week, stating over a 1000 point (11%) drop, when really only 300+ some drop had occurred. Short the Dow much?&lt;br /&gt;&lt;br /&gt;None of these are necessarily signs of stock market hacking, and I'm not saying stock market hacking is happening. All I am saying is that STOCK MARKET HACKING IS HAPPENING. Anyway, i'm going to go eat flowers now. &lt;br /&gt;&lt;br /&gt;PS. not worth reporting in more detail here: if you're a senator running for vp, don't use web mail for your work. thx.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-3609965383029438472?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3609965383029438472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3609965383029438472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3609965383029438472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3609965383029438472'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/10/st0ck-hacking.html' title='st0ck hacking'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4500523292431356112</id><published>2008-08-11T17:37:00.000-07:00</published><updated>2008-08-11T17:50:40.757-07:00</updated><title type='text'>BlackHat and Defcon</title><content type='html'>Quick Breakdown:&lt;br /&gt;&lt;br /&gt;- I apologize if you were present to witness my drunken ass-hattery on Wednesday evening. A special apology goes out to Greg and Alex for stolen and spilled drinks. &lt;br /&gt;&lt;br /&gt;- My song 'Clockwork' did not win the pwnie, but my response from the crowd was still rewarding. &lt;a href="http://www.technologyreview.com/blog/editors/tags/Pwnie+Awards/"&gt;A brief review of the awards here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- Mark Dowd and Alex Sotirov are super pimps for their talk on "How To Impress Girls With Browser Memory Protection Bypasses". This talk introduced a very clever means of bypassing the memory protection mechanisms in Vista when dealing with browser exploits. Phenomenal talk with an awesome sense of humor. &lt;br /&gt;&lt;br /&gt;- I passed the NOP cert by Immunity, with an embarrassing time in the mid to high thirties (I forget my exact time, but it isn't flattering). This was a fun test, and I recommend it to anyone who gets a chance to sit down and take it. In the 40 minute time limit, it tests your ability to find and exploit simple stack overflows on Windows 2000.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4500523292431356112?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4500523292431356112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4500523292431356112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4500523292431356112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4500523292431356112'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/08/blackhat-and-defcon.html' title='BlackHat and Defcon'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-6960039841712679494</id><published>2008-07-22T13:15:00.000-07:00</published><updated>2008-07-22T13:18:45.749-07:00</updated><title type='text'>Clockwork Nominated</title><content type='html'>My track &lt;a href="http://www.sophsec.com/clockwork.mp3"&gt;clockwork&lt;/a&gt; has been nominated for Best Song at the &lt;a href="http://www.pwnie-awards.org"&gt;Pwnie Awards&lt;/a&gt;! WooT! I'm apparently the only non-vendor supplied entry.. Wish me luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-6960039841712679494?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/6960039841712679494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=6960039841712679494' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/6960039841712679494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/6960039841712679494'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/07/clockwork-nominated.html' title='Clockwork Nominated'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-770617898032832769</id><published>2008-07-15T10:08:00.000-07:00</published><updated>2008-07-15T10:18:58.570-07:00</updated><title type='text'>DNS, and Errata</title><content type='html'>A serious DNS bug discovered by Kaminsky (lol surprise?) is rocking the Intartr0nz as people shit their pants and take guesses at what  it is. Some interesting theories have come up, but it looks like we'll have to wait until his presentation at Blackhat to know for sure. My personal guess: you call Mrs. Cleo for the TXID to spoof. She knows everything.&lt;br /&gt;&lt;br /&gt;On a side note, supposedly some cool (read: exploitable) bugs in Intel's chip errata are going to be presented this year at HackInTheBox Conference. These bugs are actual chip-level flaws that cause undefined or unwanted behavior - and apparently in some cases introduce vulnerabilities that are OS-independent. This type of security bug has been discussed in theory for a long time, so it will be interesting to see how it all turns out. More info &lt;a href="http://www.infoworld.com/article/08/07/14/Researcher_to_demonstrate_attack_code_for_Intel_chips_1.html"&gt; about the errata bugs here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-770617898032832769?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/770617898032832769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=770617898032832769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/770617898032832769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/770617898032832769'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/07/dns-and-errata.html' title='DNS, and Errata'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-8955174424969754415</id><published>2008-06-25T12:40:00.001-07:00</published><updated>2008-06-25T13:22:48.150-07:00</updated><title type='text'>Address Space Layout Information Disclosure</title><content type='html'>The software exploitation game is changing as new pieces come into play. Protection mechanisms like ASLR and stack canaries are changing how attackers approach memory corruption bugs. Both ASLR and canaries can significantly hinder traditional exploitation techniques. One interesting aspect of these protection mechanisms is that while they do hinder some attacks, they also magnify the severity of other vulnerabilities which were previously (for the most part) insignificant: &lt;span style="font-weight: bold;"&gt;memory information disclosure&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;vulnerabilities&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;As a code auditor, when I would run across some sort of pointer arithmetic or buffer walking that resulted out-of-bounds data &lt;span style="font-style: italic;"&gt;reads&lt;/span&gt;, I would tag them as informational bugs. These are typically seen as the result of faulty logic or bad coding practices. Occasionally, depending on the type of information being disclosed, there would be some security value tied to the bug: credential exposure, plain-text exposure (where crypto was used), etc...but these are mostly corner cases.&lt;br /&gt;&lt;br /&gt;However, now that security mechanisms like ASLR rely on the premise of an attacker being unable to get specific process information, these bugs transcend into an entirely higher class of value. If an attacker can get a consistent read from out of bounds on a given buffer, here are just some of the potential vectors it could be used for:&lt;br /&gt;&lt;br /&gt;- Canaries: the most obvious answer. This case would completely subvert this securtiy offered by stack/memory structure canaries.&lt;br /&gt;&lt;br /&gt;- Application Pointers: these are also obvious, as they would expose the address space layout of an application, defeating ASLR.&lt;br /&gt;&lt;br /&gt;- Stack Frame Pointers: ..etc..etc..&lt;br /&gt;&lt;br /&gt;- Library Addresses: ret2lib[X]&lt;br /&gt;&lt;br /&gt;- Rick Astley's phone number: this is stored by default in every application compiled with the new Visual Studio.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course the conditions are rare, and are probably specific to each scenario, but this may become a serious consideration being that such trivial bugs may ultimately become enablers for threats which were otherwise de-fanged.&lt;br /&gt;&lt;br /&gt;Just a thought.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-8955174424969754415?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/8955174424969754415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=8955174424969754415' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8955174424969754415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8955174424969754415'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/06/address-space-layout-information.html' title='Address Space Layout Information Disclosure'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4390993299651339898</id><published>2008-06-09T16:47:00.000-07:00</published><updated>2008-06-09T16:51:58.909-07:00</updated><title type='text'>DCCP</title><content type='html'>The Linux Kernel team published an advisory about a vulnerability in DCCP that was reported by some asshat.&lt;br /&gt;&lt;br /&gt;More information about the &lt;a href="http://www.securitytracker.com/alerts/2008/Jun/1020211.html"&gt;DCCP vulnerability here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4390993299651339898?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4390993299651339898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4390993299651339898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4390993299651339898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4390993299651339898'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/06/dccp.html' title='DCCP'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-7954147492864374466</id><published>2008-05-30T13:16:00.000-07:00</published><updated>2008-05-30T15:53:46.504-07:00</updated><title type='text'>Sad media, sad kids</title><content type='html'>Many may be aware of the script kiddie group called Kryogeniks for their recent antics which have gathered media attention.  If not, here's some reminders:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nypost.com/seven/04262007/news/regionalnews/teen_in_aol_hack_attack_regionalnews_jamie_schram_______mark_bulliet_and______hasani_gittens.htm"&gt;17 year old arrested for AOL 'Hacking' &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.zdnet.com/security/?p=1213"&gt;Comcast DNS Hijacking&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Two separate incidents warranting public attention for big bad illegal hacking. From the way the media portrays these events, one would conclude that these attackers posses the technical skills of elite super-hackers. In truth, these kids are starter-level social engineers who couldn't write a HelloWorld, make any real use of access, and fail at keeping their spoils. How could I speak on this with such broad confidence? Because I have had the unfortunate luck of having to communicate with these kiddies from past exposure. (Truthfully it is embarrassing that I even know them, given their lack of knowledge and competence).&lt;br /&gt;&lt;br /&gt;Don't go and misquote me now, for saying that social engineering is not effective -- it is effective.  Very effective.  In fact, to quote one of Murphy's Laws of Combat:&lt;br /&gt;&lt;br /&gt;"If something is stupid, but it works, it isn't stupid."&lt;br /&gt;&lt;br /&gt;Having gotten that out of the way, social engineering is the art of a conman. These kids are no more hackers than those behind the Nigerian check fraud scams that come in via email; just because you use technology to lie to someone does not make you a hacker. I am not excluding social engineering from hacking, or the obvious fact that deceit in general is a huge component of hacking. I am merely stating that this kids are not hackers.&lt;br /&gt;&lt;br /&gt;Why does any of this matter? Because the media influences the public, and the public ultimately influences the security industry. When the media fails to distinguish between kiddies and real skills, the result is that these kids become classified in the same category as people like HD Moore or Kostya Kortchinsky. The reverse association causes the public to then think that people with real skills are the same brainless morons who deface comcast.net with a social engineering phonecall that you're grandmother could have performed.&lt;br /&gt;&lt;br /&gt;No wonder no one seems to take this shit seriously.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-7954147492864374466?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/7954147492864374466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=7954147492864374466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/7954147492864374466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/7954147492864374466'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/05/sad-media-sad-kids.html' title='Sad media, sad kids'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2931857714703634353</id><published>2008-05-15T11:09:00.000-07:00</published><updated>2008-05-15T16:44:44.474-07:00</updated><title type='text'>I told you crypto sux.</title><content type='html'>Yeah so apparently someone on the Debian development team should have been forwarded the memo about &lt;a href="http://drraid.blogspot.com/2007/11/why-crypto-sucks.html"&gt;Why Crypto Sucks&lt;/a&gt;. Great. Now half the of the fucking interwebz has to regenerate keys so that my private discussions with the Avril Lavigne fan club stay private. And nothing can be done to secure any information that was publicized in an 'encrypted' (encoded) state with the broken keys.&lt;br /&gt;&lt;br /&gt;Broken: SSL. SSH. Half the universe.&lt;br /&gt;Shit I might as well just break my ankle to make it a 5-for-1 discount. And a special someone should have their fingers broken.. I've killed for less.&lt;br /&gt;&lt;br /&gt;I guess it really doesn't matter, since you can resolve any plain-text from public-key encrypted data by multiplying by 2/7.&lt;br /&gt;&lt;br /&gt;Don't worry though, ROT13 wasn't affected by this, so all you brainiac developers with your homegrown crypto are still safe..LOLOLOL. Do you know what time it is? Hammer time. Hammer fucking time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2931857714703634353?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2931857714703634353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2931857714703634353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2931857714703634353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2931857714703634353'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/05/i-told-you-crypto-sux.html' title='I told you crypto sux.'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-9144632785969270681</id><published>2008-04-01T08:38:00.000-07:00</published><updated>2008-04-01T08:54:20.801-07:00</updated><title type='text'>New Vulnerability Class - XSRR</title><content type='html'>There has been a lot of buzz in the last two years over web app vulnerabilities like XSS and XSRF which had lead to a frenzy of research to find more new classes of vulnerabilities. I have been lucky enough to be associated with the discovery and naming of a brand new type of web application vulnerability, being called &lt;span style="font-weight: bold;"&gt;XSRR&lt;/span&gt;, or &lt;span style="font-weight: bold;"&gt;Cross-Site Rick Rolling&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To give you a rough breakdown, the XSRR attack is a user-assisted attack with the potential to yield full compromise of the victim's sanity. The attack is composed by convincing a user to open a media file or follow a link leading to a media file which contains music by the all-time heavy weight MMA super champion Rick Astley.&lt;br /&gt;&lt;br /&gt;A simple walk though of this can be &lt;a href="http://smouch.net/lol/"&gt;seen at this demo page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Defenses for this new class of attacks are actively being developed, and there is currently a firefox plugin called RickRollDB which maintains a bkacklist of all known sites usable for performing XSRR.  As you can see, I'm never gonna give you up, never gonna let you down; never gonna run around and desert you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-9144632785969270681?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/9144632785969270681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=9144632785969270681' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9144632785969270681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/9144632785969270681'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/04/new-vulnerability-class-xsrr.html' title='New Vulnerability Class - XSRR'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2590395363201106110</id><published>2008-02-22T09:51:00.000-08:00</published><updated>2008-02-22T10:06:30.796-08:00</updated><title type='text'>shmoocon 08</title><content type='html'>Went to ShmooCon for the first time this year -- it was a killer time.  Quick run down of stuff learned:&lt;br /&gt;&lt;br /&gt;-- Solid-state drives and USB sticks should not be trusted as erasable media.  Short end of the story: if you need to keep sensitive data on these, use crypto, because there's no guarantee you will be able to remove data when it comes time to delete. Recommended secure wiping for these devices: hammer.&lt;br /&gt;&lt;br /&gt;-- Client side exploitation is becoming as (if not more) important in a pentest as server vulnerability assessment.  This isn't new to any one in the security industry, but it seems like clients paying for pentests just don't get it.   Jay Beale spoke about this, and it was a pretty entertaining talk.&lt;br /&gt;&lt;br /&gt;-- SIP/VoIP vulns .. there was an ok talk on this stuff, but the demonstration of illustrated attacks fell through :(. The short of it: XSS/XSRF in web servers embedded into VoIP gear.  Also, "chess grand-master" cryptographic architectural weaknesses in the nonce exchange/authentication used by many VoIP devices.&lt;br /&gt;&lt;br /&gt;-- Nerdcore rap is becoming scarily popular.  Expect more on this.&lt;br /&gt;&lt;br /&gt;-- Open bar @ Shmoo party = hackers spilling drinks, and secrets ;P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2590395363201106110?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2590395363201106110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2590395363201106110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2590395363201106110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2590395363201106110'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/02/shmoocon-08.html' title='shmoocon 08'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4445010849319452027</id><published>2008-01-03T17:37:00.000-08:00</published><updated>2008-01-03T17:47:32.872-08:00</updated><title type='text'>2008 Security Predictions</title><content type='html'>Happy New Year everyone!  Today's post is about my complex and in-depth security predictions for 2008.  This list covers the new topics we will see in security as 2008 progresses:&lt;br /&gt;&lt;br /&gt;1.   Vulnerabilities&lt;br /&gt;2.   Malware&lt;br /&gt;3.   More dumb fucking script kiddies&lt;br /&gt;4.   Botnets&lt;br /&gt;5.   Trolls on Full-Disclosure&lt;br /&gt;6.   Return of the AOL punter&lt;br /&gt;7.   Introduction of a new vulnerability class: ASCII-pr0n injection (API)&lt;br /&gt;8.   Vista pop-up security alerts&lt;br /&gt;9.   Automated web-application vulnerability scanners&lt;br /&gt;10. Quiznos Chicken Carbonara&lt;br /&gt;&lt;br /&gt;I know a lot of those seem out there, and sure, a few of them might be a stretch.. but mark my words: &lt;span style="font-style: italic;"&gt;all of these revolutionary security topics will manifest in 2008.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4445010849319452027?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4445010849319452027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4445010849319452027' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4445010849319452027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4445010849319452027'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2008/01/2008-security-predictions.html' title='2008 Security Predictions'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3820875405909485739</id><published>2007-11-08T15:55:00.000-08:00</published><updated>2007-11-08T16:44:45.347-08:00</updated><title type='text'>Why Crypto Sucks</title><content type='html'>Crypto can be used to do sleek, sexy things.  Privatize information.  Ensure data integrity.  Dice onions.  But it sucks, and here's why:&lt;br /&gt;&lt;br /&gt;- Hackers use crypto to store their uber hush-hush topsy kretts.. but spew all their information after 4 drinks at a Toorcon party.&lt;br /&gt;&lt;br /&gt;- The three letter agencies don't care about your crypto, because they've owned your box and watched you type in the password.&lt;br /&gt;&lt;br /&gt;- Cryptographers have been known to write insecure code.  Nice strcpy into your key_buf[], homie.&lt;br /&gt;&lt;br /&gt;- Developers have been known to think they're cryptographers:&lt;br /&gt;&lt;br /&gt;#define MY_KEY "lololol!"&lt;br /&gt;void encrypt(char *data, char *cipher, int len)&lt;br /&gt;{&lt;br /&gt; int i;&lt;br /&gt;&lt;br /&gt; /* nice. */&lt;br /&gt; for (i = 0; i &lt; len; ++i) cipher[i] = data[i] ^ MY_KEY[i % 8];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;- Developers sometimes do use well established, certified crypto in their code... and then store the symmetric key in #define TOPSY_KRETTS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So what do we do about it?  I have a secret 0day crypto algorithm I'm releasing right here:&lt;br /&gt;&lt;br /&gt;void secretz(char *source, *char dest, int len)&lt;br /&gt;{&lt;br /&gt;int i;&lt;br /&gt;&lt;br /&gt;if (len == 5)&lt;br /&gt;     return;&lt;br /&gt;&lt;br /&gt;for (i = 0; i &lt; len; ++i)&lt;br /&gt;{&lt;br /&gt;   dest[i] = (((((((source[i] ^ 5) &amp;amp; 0xff) ^ i) &amp;amp; 0xff) ^ i) &amp;amp; 0xFF)  ^ 5) / voodoo[i % infinity];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;exit(1);&lt;br /&gt;return 4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;That should do it.  I'm pretty sure its clownz.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-3820875405909485739?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3820875405909485739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3820875405909485739' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3820875405909485739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3820875405909485739'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/11/why-crypto-sucks.html' title='Why Crypto Sucks'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3091889185703893432</id><published>2007-10-14T19:38:00.000-07:00</published><updated>2008-06-27T21:54:49.620-07:00</updated><title type='text'>This just about sums up code auditing</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;int&lt;/span&gt; SumDumFunc1(&lt;span style="color: rgb(204, 204, 204);"&gt;char&lt;/span&gt; *s)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    &lt;span style="color: rgb(204, 204, 204);"&gt;blah&lt;/span&gt; blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    &lt;span style="color: rgb(204, 204, 204);"&gt;blah&lt;/span&gt; blah[&lt;span style="color: rgb(102, 102, 204);"&gt;45&lt;/span&gt;];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah &lt;span style="color: rgb(255, 0, 0);"&gt;FUCKING VULN&lt;/span&gt; h blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah &lt;span style="color: rgb(255, 0, 0);"&gt;ANOTHER FUCKING VULN RIGHT HERE&lt;/span&gt; ah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    blah blah blah blah blah blah blah blah blah;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;}&lt;/span&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/7379993593392712404-3091889185703893432?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3091889185703893432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3091889185703893432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3091889185703893432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3091889185703893432'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/10/this-just-about-sums-up-my-job.html' title='This just about sums up code auditing'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3022890563985956739</id><published>2007-10-11T17:42:00.001-07:00</published><updated>2007-10-11T18:36:19.300-07:00</updated><title type='text'>Malware Tag</title><content type='html'>Proposal for Malware Tag:&lt;br /&gt;&lt;br /&gt;With the pending inconsistencies and ambiguities around malware and its propogation through websites, it has become apparent that a change is in order.  After long conversations with my good friend Imul from lul-disclosure labs, a solution has manifested: the &lt;span style="font-weight: bold;"&gt;malware tag&lt;/span&gt;. A revolutionary concept, this tag aims to unify how malware is represented -- allowing web browsers and their users to act accordingly.&lt;br /&gt;&lt;br /&gt;The advantages of the malware tag are vast.  Deep inspection firewalls would be able to filter traffic upon layer 7 detection of markup tags (previously the layer 3 evil-bit was the only option available).  The combined ability of both evil-bit and malware tag detection gives network appliance vendors a very sexy yet functional and markettable product.  The malware tag will redefine world class paradigms, and spearhead Web 3.0 as bleeding edge technology.  Heres how it will work:&lt;br /&gt;&lt;br /&gt;- Sites with malware must place &lt;malware&gt;&lt;/malware&gt; &amp;lt;malware&amp;gt;             &amp;lt;/malware&amp;gt;  around content which could be percieved as malicious software.  Sites which fail to do so will not be Web 7.0 compliant.&lt;br /&gt;&lt;br /&gt;- Sites which do not host malware should not use this tag, as it is misleading to users and may ultimately result in mis-representation/public relation issues.&lt;br /&gt;&lt;br /&gt;- Starting in Web 4.6, all Browsers must observe the malware tag, and present the user with options pertaining to the malware type.  Some suggestions would be to request the user to type in or email the site owner with all passwords/credentials (as to ease the transition into being owned).  Randomly deleting files or sending the malware on to other users by hand are also options.&lt;br /&gt;&lt;br /&gt;- Malware writers should categorize their products so that they may be easily representable in markup languages.  This will allow for the creation of other tags like &amp;lt;deletes_files&amp;gt; &lt;deletes_files&gt;&lt;assisted_spam&gt;or &lt;/assisted_spam&gt;&lt;/deletes_files&gt;&amp;lt;&lt;deletes_files&gt;&lt;assisted_spam&gt;botnet_client&lt;/assisted_spam&gt;&lt;/deletes_files&gt;&amp;gt;&lt;deletes_files&gt;&lt;assisted_spam&gt; &lt;botnet_client&gt;. Classification of malware specifics will help browsers act accordingly.&lt;br /&gt;&lt;br /&gt;-AV products may search for specific tags, which will determine how they should act: &lt;/botnet_client&gt;&lt;/assisted_spam&gt;&lt;/deletes_files&gt;&amp;lt;detect_immediately&amp;gt;&lt;deletes_files&gt;&lt;assisted_spam&gt;&lt;botnet_client&gt;&lt;do_not_detect&gt; or&lt;/do_not_detect&gt;&lt;/botnet_client&gt;&lt;/assisted_spam&gt;&lt;/deletes_files&gt; &amp;lt;miscategorize&amp;gt;&lt;deletes_files&gt;&lt;assisted_spam&gt;&lt;botnet_client&gt;&lt;do_not_detect&gt; &lt;miscategorize&gt; or &lt;/miscategorize&gt;&lt;/do_not_detect&gt;&lt;/botnet_client&gt;&lt;/assisted_spam&gt;&lt;/deletes_files&gt;&amp;lt;do_not_detect&amp;gt; &lt;deletes_files&gt;&lt;assisted_spam&gt;&lt;botnet_client&gt;&lt;do_not_detect&gt;&lt;miscategorize&gt;&lt;flag_immediately&gt; are some examples.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is just a draft, and some of the Web versions might need to be adjusted (for Ajax and things), however once thing is certain: &amp;lt;malware&amp;gt; is the new hotness.  Suggestions/input/tag features are welcome via email, as long as they are in before I send in the tag proposal to w3c.&lt;br /&gt;&lt;/flag_immediately&gt;&lt;/miscategorize&gt;&lt;/do_not_detect&gt;&lt;/botnet_client&gt;&lt;/assisted_spam&gt;&lt;/deletes_files&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-3022890563985956739?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3022890563985956739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3022890563985956739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3022890563985956739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3022890563985956739'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/10/malware-tag.html' title='Malware Tag'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-4589875275167562314</id><published>2007-09-18T13:58:00.000-07:00</published><updated>2007-09-18T14:04:56.926-07:00</updated><title type='text'>/GS pointer subterfuge</title><content type='html'>Ok so after people complained of not having a valid code example for my previous post 'smoke &amp;amp; mirrors', here we go:&lt;br /&gt;&lt;br /&gt;-- begin snip --&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;   meow();&lt;br /&gt;   return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void meow(void)&lt;br /&gt;{&lt;br /&gt;   int x;&lt;br /&gt;   int *y;&lt;br /&gt;&lt;br /&gt;   y = &amp;amp;x+3;&lt;br /&gt;   *y = ((int )woot);&lt;br /&gt;&lt;br /&gt;   return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void woot (void)&lt;br /&gt;{&lt;br /&gt;   printf("owned\n");&lt;br /&gt;   return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;-- end snip --&lt;br /&gt;&lt;br /&gt;woot() is never called, but by pointer offset its address is used to overwrite EIP resulting in a jmp to it at the end of meow()..  /GS does nothing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-4589875275167562314?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/4589875275167562314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=4589875275167562314' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4589875275167562314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/4589875275167562314'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/09/gs-pointer-subterfuge.html' title='/GS pointer subterfuge'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-1858767406842704250</id><published>2007-09-18T10:49:00.000-07:00</published><updated>2007-09-18T13:30:13.055-07:00</updated><title type='text'>infosec glossary</title><content type='html'>Many people who are new to information security are overwhelmed by all the terminology, so I've created a light glossary of terms for quick reference..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Threat Model:&lt;/b&gt; Jessica Alba with a gun&lt;br /&gt;&lt;br /&gt;&lt;b&gt;XSS:&lt;/b&gt; the size of shirt making it appear so tight on the threat model.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Full Disclosure:&lt;/b&gt; what happens when that same shirt comes off :D&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Remote Compromise:&lt;/b&gt; the agreement made between 2 television viewers over which channel to watch.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Denial-of-Service:&lt;/b&gt; this is what occurs if you enter a 7-11 without shirt or shoes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rootkit:&lt;/b&gt; a do-it-yourself bonzai tree package, usually given as a gift.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Heap Overflow:&lt;/b&gt; too much laundry to keep in one pile.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Stack Overflow:&lt;/b&gt; a similar pile problem, but with paperwork at your job.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Trojan:&lt;/b&gt; what you need before hitting the clubs -- you might meet a girl&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Penetration Test:&lt;/b&gt; where the trojan will come into play&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Backdoor:&lt;/b&gt; where she'll ask for it, if you're lucky&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Zero-Day:&lt;/b&gt; time remaining for you to get that marketing proposal done&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Firewall:&lt;/b&gt; where you line up at the unemployment center if you fail to finish the marketing proposal&lt;br /&gt;&lt;br /&gt;..more to come..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-1858767406842704250?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/1858767406842704250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=1858767406842704250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1858767406842704250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/1858767406842704250'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/09/infosec-glossary.html' title='infosec glossary'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-3221909401889835721</id><published>2007-09-16T17:57:00.000-07:00</published><updated>2007-10-16T08:13:41.918-07:00</updated><title type='text'>Ssh!  keep it secret.</title><content type='html'>meow mix delivers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-3221909401889835721?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/3221909401889835721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=3221909401889835721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3221909401889835721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/3221909401889835721'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/09/ssh-keep-it-secret.html' title='Ssh!  keep it secret.'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2419803647205669160</id><published>2007-09-11T09:32:00.000-07:00</published><updated>2007-09-11T09:45:53.353-07:00</updated><title type='text'>Buzzwords</title><content type='html'>LoL! I got my ASLR AJAX DEP enabled with Web 2.0 hypervisor rootkit dual-core capacity.  Now that my determined adversary's look-asside list is a dangling pointer, the biometric cross-site request forgery will probably end up with 802.11-N (mimo technology, ofcourse).  This all assumes the penetration test rainbow table doesn't result in a 'trivial' iPhone TitanRain exploit condition.  Its trivial, like quantum prime factorization.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Buzzwords are for bitches.  Write some code.  Word.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2419803647205669160?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2419803647205669160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2419803647205669160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2419803647205669160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2419803647205669160'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/09/buzzwords.html' title='Buzzwords'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-8070627719889434985</id><published>2007-09-02T10:33:00.000-07:00</published><updated>2007-09-02T11:13:16.727-07:00</updated><title type='text'>Infosec Burnout</title><content type='html'>Information security sellout or &lt;b&gt;burnout&lt;/b&gt;?  The hype/buzz around the infosec sellout blog has died down now, with the apparent spammer compromise of the blogspot account where posts were made.. kind of a shame, considering the sketchy yet entertaining nature of the character(s) making posts.  &lt;br /&gt;&lt;br /&gt;Truth be told, I don't think there are sell outs anymore in infosec.  All the good people from way-back who &lt;i&gt;would&lt;/i&gt; sell out have already sold out, and anyone else is too new to have been anything other than an industry whore.  The sad part is now we're in the age of the &lt;b&gt;burnouts&lt;/b&gt;.  The burnouts are both the sellouts aswell as those who with-held from sacrificing their pride.  The hacker rockstars who molded the very industry by revolutionizing how security is perceived, now so sick of the bullshit that they don't even touch computers anymore.  It is a tragedy of sorts.  I find myself meeting up and talking with legends who have re-aligned their life interests, changing how they want to live -- abandoning security altogether.   With the commercialized snake-oil, branded bullshit selling off the shelves (John-Joe Pentest and Company), and lawsuits against anyone doing anything interesting (Apple, Apple, and Apple), there just isn't enough room for any truly talented hackers.  Smoke crack.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-8070627719889434985?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/8070627719889434985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=8070627719889434985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8070627719889434985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8070627719889434985'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/09/infosec-burnout.html' title='Infosec Burnout'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-5115651913469961947</id><published>2007-08-28T13:30:00.000-07:00</published><updated>2008-06-06T14:42:51.721-07:00</updated><title type='text'>Sm0ke &amp; Mirrorz</title><content type='html'>&lt;span style="font-style: italic; color: rgb(255, 204, 0);"&gt;[Update-6/6/2008]: A friend pointed out that this post is only relevant for Visual Studio 2003. Newer implementations of the /GS flag, (in Visual Studio 2005, etc)  XOR the EIP with the canary. This implementation is a lot sexier and makes the description by Micahel Howard accurate. It should be noted that if there is more than one pointer that an attacker can use to perform a read and a write, it may still be possible to subvert EIP without triggering /GS. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All the pretty lies tickle me pink.&lt;br /&gt;&lt;br /&gt;Remember when..&lt;br /&gt;&lt;br /&gt;- "You won't get owned if you don't open the email."&lt;br /&gt;- "You can't get owned just from viewing a picture."&lt;br /&gt;- "An overflow? Oh but it's on the heap, we're ok."&lt;br /&gt;- "Our WiFi has the SSID hidden + WEP, so unless you know about it.."&lt;br /&gt;&lt;br /&gt;Time and time again the false sense of security shared by technology users gets shattered with the publication of a total-pwnage proof-of-concept.  With their faces hitting a rough pavement of truth, eventually you would think that they learn.  But really, SHIT NEVER CHANGES.  Presently, you have these dumb-f^cK$ running around, acting like ASLR + Stack Canary + DEP means they can let their guard down and resume smoking crayola rock.  It gets worse when a trusted information security source provides incorrect information that gets turned into a Bible reference.&lt;br /&gt;&lt;br /&gt;Take &lt;u&gt;Writing Secure Code, 2nd Edition&lt;/u&gt; by Michael Howard, for example.  This book is relatively well written with a lot of accurate information intended to help developers understand and write secure code.  Before I say anything else, I would also like to give Michael his props -- he knows his stuff.  The problem is that even the slightest technical mishap in the description a coding bug or protection mechanism can result in a cult of ignant developers. Yes, I said ignant.  Especially when the book is dubbed 'required reading' within a corporation.&lt;br /&gt;&lt;br /&gt;Page &lt;b&gt;168&lt;/b&gt;, in the context of describing buffer-overflow mitigation, outlines the security-add offered by the protection mechanism within Visual Studio's /GS flag.  (For those *nix people out there who won't/don't/can't touch MS Visual Studio, the /GS option implements stack cookies/canaries similar to those of Crispin Cowan's Stackguard, with a little more voodoo. For those of you who are not familiar with the stack canary/cookie concept, might I recommend a career in &lt;a href="http://en.wikipedia.org/wiki/Basketry"&gt;Basket Weaving&lt;/a&gt;.)  On each point listed on page 168, a known attack method (stack smashing, heap overruns, etc) is given with a description of if/how the mechanism can be used to prevent exploitation.  For 'Pointer Subterfuge' the following description is given:&lt;br /&gt;&lt;br /&gt;"Overwriting a local pointer in order to later place data at a specific location--/GS can't stop this, unless the specific location is a return address."&lt;br /&gt;&lt;br /&gt;This description would be 100% correct if it were just 7 words shorter; stopping at "/GS can't stop this".  If an attacker controls a pointer directly pointed to the return address, and touching nothing else, there is absolutely nothing to trigger /GS. I mean this is pretty obvious, please don't think im saying this is something new -- it's just textually incorrect.  Am I just being a pedantic asshole? You bet. Does my asshole-like nature inhibit developers from mangling security with this information? Not at all...&lt;br /&gt;&lt;br /&gt;Again I should note that Michael Howard knows his shit, and he alerts developers not to place blind faith in the protection mechanisms described.  I am by no means categorizing him with the idiots who unknowingly perpetuate stupidity on a grandiose scale.. My concern is that in a world where "Oh its on the heap, we're okay" was the mantra for years, the most minute inconsistency could ultimately lead to a slew of mayhem.  These inconsistencies are everywhere, and they allow people to believe in smoke and mirrors.. Tickles me pink.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-5115651913469961947?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/5115651913469961947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=5115651913469961947' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/5115651913469961947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/5115651913469961947'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/08/sm0ke-mirrorz.html' title='Sm0ke &amp; Mirrorz'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-8562259458237650468</id><published>2007-08-27T08:38:00.000-07:00</published><updated>2007-08-27T08:43:25.257-07:00</updated><title type='text'>dr.raid, rainsec, and the revolution</title><content type='html'>w00t.  RainSec was killer this last Sunday; good turnout, awesome discussion, fluid group dynamic.  We have things in the works.  Things to be on the lookout for: united scene in Portland, party at defcon, and vote Dr.Raid 4 Emperor '08.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-8562259458237650468?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/8562259458237650468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=8562259458237650468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8562259458237650468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/8562259458237650468'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/08/drraid-rainsec-and-revolution.html' title='dr.raid, rainsec, and the revolution'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-2206087645400223744</id><published>2007-08-24T09:00:00.000-07:00</published><updated>2007-08-24T10:48:24.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sophsec'/><title type='text'>SophSec - WtF?</title><content type='html'>With SophSec having released some code (well,..kinda ;), and having given a talk at ToorCon Seattle Beta, we've been asked "WtF are U,  WtF do U do?".  Good question.  &lt;br /&gt;&lt;br /&gt;We don't have a public business, we don't sell services, and our group motto is "Sketchy Shit, Competitive Prices".  If we were a business, who would take us seriously?  Even our name it self "SophSec" is a parody.. a parody of the bulk-sale snake-oil that manifests after some well funded assholes start a business using some shitty word with 'sec' in it, and calling it a Security Firm. This results in an organization that is devoid of talent, named "Clandestine-Sec Services", selling nothing more than a false sense of security.  Ultimately these businesses end up giving those of us who are truly passionate about security a badname.  &lt;br /&gt;&lt;br /&gt;SophSec is just the opposite.  We're trying to promote growth in the infosec field, sprinkled with a little bit of sketchy.  We also serve as a front; we have an affiliate program for people who still want to work on cool security projects/PoCs/whatever without their name tied to it directly.  In this way we almost operate like an intel agency, keeping the identity of our affilitates secret if they don't want to be known. At the end of the day, we're about getting shit done.  Cool Shit.  Movie hacker type shit.  Word.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-2206087645400223744?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/2206087645400223744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=2206087645400223744' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2206087645400223744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/2206087645400223744'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/08/sophsec-wtf.html' title='SophSec - WtF?'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379993593392712404.post-6896691015665524364</id><published>2007-08-16T17:26:00.000-07:00</published><updated>2007-08-16T17:42:20.205-07:00</updated><title type='text'>begin here</title><content type='html'>So in my introduction I wanted to write something funny,.. you know, like those blog people who say silly shit like they handpaint the Ms on M&amp;Ms for 14 hours a day, or are as laid back as Stephen Hawking.  The truth is I'm just not a funny person.  I occasionally find myself in laughing fits, but end up resuming normal activies after I forget where I dropped the rubber cement.   Professionally, I work for a big security company doing security stuff, securely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7379993593392712404-6896691015665524364?l=drraid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drraid.blogspot.com/feeds/6896691015665524364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7379993593392712404&amp;postID=6896691015665524364' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/6896691015665524364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379993593392712404/posts/default/6896691015665524364'/><link rel='alternate' type='text/html' href='http://drraid.blogspot.com/2007/08/begin-here.html' title='begin here'/><author><name>drraid</name><uri>http://www.blogger.com/profile/13305660414894743601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
