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

<channel>
	<title>SecuriTeam Blogs &#187; Prozacgod</title>
	<atom:link href="http://blogs.securiteam.com/index.php/archives/author/prozacgod/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.securiteam.com</link>
	<description>Thoughts about the world of security</description>
	<lastBuildDate>Tue, 15 May 2012 05:11:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Anecdotal story about myself, worm writing and Emergent behavior in Worms</title>
		<link>http://blogs.securiteam.com/index.php/archives/702</link>
		<comments>http://blogs.securiteam.com/index.php/archives/702#comments</comments>
		<pubDate>Thu, 26 Oct 2006 20:33:47 +0000</pubDate>
		<dc:creator>Prozacgod</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://blogs.securiteam.com/index.php/archives/702</guid>
		<description><![CDATA[When I first started [I was about 13 &#038; 1/2] working with computers I was really interested in figuring out how the &#8216;did what they did&#8217;. So much so that I was tinkering with assembler within 6 months of getting a computer, not that I accomplished much at that time. I didn&#8217;t have internet access [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started [I was about 13 &#038; 1/2] working with computers I was really interested in figuring out how the &#8216;did what they did&#8217;.  So much so that I was tinkering with assembler within 6 months of getting a computer, not that I accomplished much at that time.  I didn&#8217;t have internet access so my only &#8216;escape&#8217; from the real world was delving deeper into the machine.  I quickly developed programming skills and was becoming trapped by the limits imposed in QuickBasic (hey we all learn somehwere <img src='http://blogs.securiteam.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ).  I went back to looking at assembler since I knew I could encode byte code into the basic programs.  After that I made some great mode 13 games and demos.<span id="more-702"></span><strong>note:</strong> I tend to explain stories with stories! Please forgive the length of this.</p>
<p>A friend of mine, who was a year younger than me at this time, was talking about his new job.  He was writing code for a local company.  This is extremely odd, since I live in a town of about 2500 people.  I took a disk of my programs and went there.  He hired me on the spot, and then introduced me to Pascal and loaned me a 200mhz Pentium with 32mb ram (a 4000$ machine at that time. I think it also had 10gb of scsi disk space!)</p>
<p>Anyway past the amazingly boring back story.  After I had worked there off and on for about 4 years, I was starting to notice more and more security problems with the application.  The application relied on code that was ported from DOS into windows 95/98.  It was the database access.  He had written his own flat-file &#038; index database scheme.  This required that the user running the application ran it from a share over the network.  Complicated file locking schemes allowed multiple users to access the data.  Except for one hold over from the original DOS code.  You had to share you entire Drive. Yup the whole thing with full read/write access.   The reasons were for convenience and there were several document folder and other things that the application accessed.  Generally most people installed this program into their C drive.  So 90% of the owners of this application were sharing their C drive out to people.  Consider that their market is small, they did have (and currently still do) more than 50% of their market at about 4500+ users.</p>
<p>When access to the internet became more pervasive and broadband was becoming affordable for companies.  I realized we had a problem.  And to illustrate this problem, I &#8216;exploited&#8217; the security holes.<br />
This was a simple worm, simple enough I figured to just show what issues we are facing and what we are forcing our customers to do.  No one in the company ever listened to my suggestions of simple steps to mediate the problem. Such as making a couple of fileshares, a Read only executable directory, and a read/write data directory, and several other shares to allow access of the network documents and other things.  To them this complicated things on the end users side too much.  Also to do tech support 90% of all the employees in the building shared their C drives, and their program folders.<br />
The worm used an old exploit in Win98 dealing with the explorer.exe execution and the path.  When windows started it executed the shell as &#8216;explorer.exe&#8217;.  And as you should know to execute a program the OS searches the path.  Explorer.exe was placed in the windows folder.  But it turns out that the computer had a default path of C:\;C:\WINDOWS;  If you were to place an explorer.exe into the C folder. well I&#8217;m sure you can see where this is going.</p>
<p>Once executed my program would immediately execute the real explorer.  And then wait 2 minutes.  After 2 minutes it would look for all computers on the network, and find folders that matched the criteria of being a &#8216;root&#8217; share ( I believe I tested presence of a &#8216;Program Files&#8217; directory and the windows/explorer.exe file were both there) Once a share was found, it attempted to copy itself to that share, After it copied itself to ALL available shares, It would play a sound resource the laugh of that Mutley Dog character. it would wait one minute do laugh again, and then 30 sec, and laugh again.</p>
<p>Once I was done writing and testing the code, I unleashed it unto the local network. I left work that night, not knowing how many computers I had infected in my first round.</p>
<p>When I came to work the next morning, all you could hear around the office was the sound of mutley, you would hear that laugh at least 3 times once every half hour.  There were about 50 computers in the office.  The Jig was up.  The IT dept. had no clue what was going on, because norton didn&#8217;t detect it.  Honestly they never had a clue.</p>
<p>After I figured my point was made, and nobody had figured out what was going on.  I ran the program I wrote to &#8216;clean up&#8217; the mess.  It went around deleting explorer.exe files that matched the md5 sum of the original release.<br />
All is well I thought.  At least I thought it would be well.  Within about 3 hours, machines started laughing again.  I ran my program and 20-ish  infections were found, the first run had almost 100% saturation, as in all of the machines I could see most of them had the worm.</p>
<p>After I ran it, and deleted the files, I thought phew, there all gone.  I ran it a second time just to make sure.  Turns out, little did I know, that computers that are powered off tend not to communicate with the network.</p>
<p>When I arrived at work the next day, again computers were laughing and I swear I was starting to go pale.  I never expected this to be so amazingly pervasive.  It seems logical that if you install it on all the computers that are visible on the network, and all of those machines installed it to visible computers, you&#8217;d just have to delete it from all the visible computers.  Wrong!  Well sorta.  It turns out that each computer that got the worm installed on it, had different notions of what constituted a visible computer.  Also a few people who &#8216;upped&#8217; their security with passwords on their shares, were actually harboring the worm from my cleanup program.  The worm got installed to those computers through other people who had the passwords, somehow my worm would get access to those computers. My only conclusion at that pooint was some people had mapped network drives to password protected shares, with saved passwords.  This allowed the bug, because of windows propensity to just do what is convenient to install it to those computer.  I never verified this, so it could be wrong.</p>
<p>I realized what I had to do, and I talked to my manager, he laugh at me, and said he thought it was annoying but mildly humorous.  I told him I would stay after and go to each of the 50 computers in the office and delete it manually.  He was really impressed at the emergent behavior of the worm, since he was actually working on some genetic algorithms in his free time.</p>
<p>I spend that evening cleaning up the worm.  Took forever, I had to take the network switch offline, and go to the few computers that were needed after hours, and clean them first, then connect their cables back to the switch and get them up and running.</p>
<p>After I did that I figured now all will be good.  Until the next Monday that is.  On Monday I got a report from the IT guys that one of the training laptops was booted up and .. was laughing.  They were gone from mid-week over the weekend and had returned.  They heard the laughing but didn&#8217;t know what it was nor how to fix it.</p>
<p>They didn&#8217;t even bother to call IT, they just ignored it whilst onsite, not only that they plugged into a customers network.</p>
<p>I cleaned up the laptops, but they had already left their mark.  Most of the computers on the network were reported infected by my tool, and by the late afternoon, it felt as if all of the machines were laughing at me.</p>
<p>I stayed yet again to fix all of the machines that were infected. This was starting feel like a ritual.  After this last time, It was over.  The managers who knew about it, hid that I had done it from those who would not be happy.  Though most people knew I did it.  The &#8216;man in charge&#8217; did not.  Which was good, because I would have probably lost my job.  So I never really got to prove my point, all I did was make a massive headache for myself.  Not only did I not achieve my end goal.  It seems that life always finds a way.</p>
<p>6 months after everything had died down and most had forgotten the whole ordeal.  I was sitting at my computer desk.  Which had been moved across the prairie and right next to the IT room.  From behind the doors, I heard a disturbing sound.  A cooworker who heard it at the same time looked straight at me, and asked me if I had seen a ghost,  And smiled.  He knew why I was damn near pale white.</p>
<p>Turns out while that whole mess was going on 6 months ago, one of our founders children who works as a missionary in mexico, He took a computer with him down to the missionary camp. Well &#8211; he came back.  His computer was &#8216;messed up&#8217; and they could not get it to boot.  So they removed the hard drive stuck it in another computer, and proceeded to boot it up. That action installed the worm all over again.   Only this time we were up to 70+ computers, and it took me almost a week to fix it, and remove the worm.  After that it never came back.</p>
<p>Okay, this amazingly long winded story, has a few lessons learned.  Number one I don&#8217;t think anyone would write a virus/worm if they were the ones who would have to clean up after themselves.  Second is, I never realize it, but emergent patterns start to form with the spread of this worm or any, it almost seemed alive at times, it was crazy to watch all of this unfold.  Third if your going to write a worm, make sure it doesn&#8217;t advertise!  esp. since any time I hear the mutley laugh I cringe horribly.  I was under the naive impression that the bug would never spread out of the local network.  I couldn&#8217;t imagine how, since it infected the harddrive.  I had never considered that we had laptops that went to customers sites.  And then plugged into their network, I don&#8217;t really know if the bug ever got out in the wild, but there were two incidences that could have made it possible.  Thought I&#8217;ve still never heard of w32.mutley <img src='http://blogs.securiteam.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Okay for those of you who wish to scold me for creating devious programs, save your breath.  I learned my lesson, in more ways than this, but we&#8217;ll just leave it at that.</p>
<p>Oh yeah, BTW the whole point of the mess with the shares, well they never changed a thing.  In order to run that app you have to share your whole drive with read write access.  They do suggest using domains, and passwords, but ANY user can change ANY file in the shared folder.  So a worm that wants to spread could easily exploit a simple exe swap trick to infect other computers on a network.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblogs.securiteam.com%2Findex.php%2Farchives%2F702&amp;title=Anecdotal%20story%20about%20myself%2C%20worm%20writing%20and%20Emergent%20behavior%20in%20Worms" id="wpa2a_2"><img src="http://blogs.securiteam.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.securiteam.com/index.php/archives/702/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Very big spam list</title>
		<link>http://blogs.securiteam.com/index.php/archives/691</link>
		<comments>http://blogs.securiteam.com/index.php/archives/691#comments</comments>
		<pubDate>Fri, 20 Oct 2006 16:40:55 +0000</pubDate>
		<dc:creator>Prozacgod</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://blogs.securiteam.com/index.php/archives/691</guid>
		<description><![CDATA[I innadvertantly became the owner of a copy of a HUGE list of email addresses used by spammers. The list includes about 23 1/2 million addresses. This is quite and interesting Conundrum. Ethically Do I alert the spammers of their mistake, which allowed one of our customers to download these files (open directory browsing). Do [...]]]></description>
			<content:encoded><![CDATA[<p>I innadvertantly became the owner of a copy of a HUGE list of email addresses used by spammers.  The list includes about 23 1/2 million addresses.</p>
<p>This is quite and interesting Conundrum. Ethically Do I alert the spammers of their mistake, which allowed one of our customers to download these files (open directory browsing).  Do I do nothing?  Should I write an email that states &#8220;I represent the following people attatched to this email, and they demand they are removed from your list at once&#8221;</p>
<p>I find the latter part quite amusing.  Although I don&#8217;t truly represent them, and it would be a lie.  I doubt a single soul on that list would really argue.  but 1 out of 23 million is actually quite possible <img src='http://blogs.securiteam.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Interestingly a little more than half of those people on the list are refered to as &#8216;adult&#8217; customers.<br />
What would you do? Or rather should I do with this list?  I cringe at the thought of what a friend had told me. &#8220;Start a torrent and post it to mininova&#8221; &#8211; I&#8217;m glad he didn&#8217;t end up with the list!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblogs.securiteam.com%2Findex.php%2Farchives%2F691&amp;title=Very%20big%20spam%20list" id="wpa2a_4"><img src="http://blogs.securiteam.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.securiteam.com/index.php/archives/691/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Windows assembler buffer overflow code questions</title>
		<link>http://blogs.securiteam.com/index.php/archives/633</link>
		<comments>http://blogs.securiteam.com/index.php/archives/633#comments</comments>
		<pubDate>Fri, 22 Sep 2006 14:33:39 +0000</pubDate>
		<dc:creator>Prozacgod</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blogs.securiteam.com/index.php/archives/633</guid>
		<description><![CDATA[I dissasembled the code snippet that came with the VML buffer overflow, and was interested in making it more &#8216;mundane&#8217; like a hello world example exploit &#8211; I know kinda lame, but I was doing this to understand more on how a random piece of code can &#8216;figure&#8217; out its address space and do malicious [...]]]></description>
			<content:encoded><![CDATA[<p>I dissasembled the code snippet that came with the VML buffer overflow, and was interested in making it more &#8216;mundane&#8217; like a hello world example exploit &#8211; I know kinda lame, but I was doing this to understand more on how a random piece of code can &#8216;figure&#8217; out its address space and do malicious things..</p>
<p><span id="more-633"></span>  I don&#8217;t understand how to call a windows kernel function, I see the other code doing it, but there is a complicated mix of code that eventually sets <strong>esi</strong> to point to a table for the library calls, [esi+0x4] = KERNEL32.GetSystemDirectoryA,  [esi+0x10] = urlmon.URLDownloadToFileA</p>
<p>I think the code in the exploit build a lookup table at ESI and then call the functions as required, I&#8217;m not sure how it does that, and how it knows where the calls are located.</p>
<p>Is there a reference or a good tutorial/howto or an &#8216;exploit code for  dummies&#8217; book..</p>
<p>Also, I have a lack of good assembler tools, so I resorted to what I know &#8211; don&#8217;t hurt me &#8211; raw byte code &#8211; and using Borland Delphi&#8217;s debugger to parse through it.  Any got recommendations on a assembler/dissasembler perhaps a good editor or IDE for such a conglomeration under windows ?</p>
<p>I find it amazing that I haven&#8217;t touch asm in 4 years or better but still haven&#8217;t really forgotten much</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblogs.securiteam.com%2Findex.php%2Farchives%2F633&amp;title=Windows%20assembler%20buffer%20overflow%20code%20questions" id="wpa2a_6"><img src="http://blogs.securiteam.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.securiteam.com/index.php/archives/633/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP &amp; Militarizing input variables ..</title>
		<link>http://blogs.securiteam.com/index.php/archives/631</link>
		<comments>http://blogs.securiteam.com/index.php/archives/631#comments</comments>
		<pubDate>Fri, 22 Sep 2006 13:15:01 +0000</pubDate>
		<dc:creator>Prozacgod</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blogs.securiteam.com/index.php/archives/631</guid>
		<description><![CDATA[While pondering good material to actually write about, I was going through a PHP library I had written a while back. Some simple possibly overkill variable validation routines to verify what I was passing was truly intended. The library made use of a small set of utility functions. The library was called militarized.php some basic [...]]]></description>
			<content:encoded><![CDATA[<p>While pondering good material to actually write about, I was going through a PHP library I had written a while back.  Some simple possibly overkill variable validation routines to verify what I was passing was truly intended.</p>
<p><span id="more-631"></span> The library made use of a small set of utility functions.  The library was called militarized.php some basic examples of what it had were defined as ..</p>
<blockquote><p>militarize_integer($integer, $min, $max)<br />
militarize_string($integer, $min_len, $max_len)<br />
militarize_set($integer, $min_len, $max_len, $expected)<br />
demilitarize_integer($integer, $min, $max)<br />
demilitarize_string($integer, $min_len, $max_len)<br />
demilitarize_set($integer, $min_len, $max_len, $expected)</p></blockquote>
<p>Each of these functions were used at the beginning of a library function that HAD to have trusted variables such as &#8230;</p>
<blockquote><p>function fetchUserDetails($uid) {<br />
$uid = demilitarize_integer($uid, 1, 100000);  // arbitrary maximum of 100000 users<br />
$q = &#8220;select * from users where uid=&#8217;$uid&#8217;&#8221;;<br />
}</p></blockquote>
<p>The idea here was a militarized variable was expected, and was formated as an associative array with the keys &#8216;mil&#8217;, &#8216;value&#8217; , &#8216;min&#8217;, and &#8216;max&#8217; &#8211; obviously you couldn&#8217;t just use the variable in your code &#8216;as is&#8217; when passed you had to demilitarize it, and second if you didn&#8217;t pass the right type, your code would fail.  The code would also fail if the variable did not pass certain tests.  For integers this would be a range, for strings this would be length, and for a set this would be length and the presence of said string in an array</p>
<p>Using this library also helped in asserting, during development, your intentions, because you had to call the function using the militarize_XXX routine as in :</p>
<blockquote><p>fetchUserDetails(militarize_integer($_GET['uid'], 1, 100000));</p></blockquote>
<p>So, what does everyone think about this?  Simple enough, and very assertive as to what you intend to do, Is this overkill or do you think its appropriate?  This does double up quite a lot in actually testing variables, as an integer variable with range 1-10 does not match an integer variable with a range 1-100 &#8211; I never completed coding the tests for sets to have comparitive arrays, I just checked the presence during the demilitarized side of things.  I also hardly used sets anyway, and ended up using integers where possible.  The only place I can remember using a set of strings was where the user could create the list of keys theirselves and the list was dynamic.  I would fetch the list assert the value was in the list, and push it through..</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblogs.securiteam.com%2Findex.php%2Farchives%2F631&amp;title=PHP%20%26%20Militarizing%20input%20variables%20.." id="wpa2a_8"><img src="http://blogs.securiteam.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.securiteam.com/index.php/archives/631/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cthulhu fhtagn</title>
		<link>http://blogs.securiteam.com/index.php/archives/625</link>
		<comments>http://blogs.securiteam.com/index.php/archives/625#comments</comments>
		<pubDate>Thu, 21 Sep 2006 13:34:48 +0000</pubDate>
		<dc:creator>Prozacgod</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blogs.securiteam.com/index.php/archives/625</guid>
		<description><![CDATA[Since I’m new to Securiteam I feel that an introduction is required, so you may understand who I am and what I stand for. This post will not discuss security directly, but more of where I feel computers are going and, as a person interested in security, where I wish computers to go.]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m new to <a href="http://www.securiteam.com/">Securiteam</a> I feel that an introduction is required, so you may understand who I am and what I stand for.  This post will not discuss security directly, but more of where I feel computers are going and, as a person interested in security, where I wish computers to go.</p>
<p>&#8220;Cthulhu fhtagn&#8221; &#8211; When refering to computer security no one phrase can honestly say more than this for me.  Inside each and every machine a monster lurks, this monster is  nothing more than bits and bytes, with execution on its mind.  Execution of what is the next question.  It has no feelings, and its above morality, all it really wants to do is push the next set of instructions down its pipelines.  Whatever instructions it gets it runs.  For this reason and this reason alone we as users need to understand what we want and desire from our machines.<span id="more-625"></span></p>
<p>In a way this is a declaration of what my computer should do for me.  This is a simple declaration, because when you get down to it, computers are incredibly simple.  They are so simple infact that in order to run them you have to make a complex assortment of simple commands &#8211; all chained together like DNA.  This DNA commands the machine.  Like our own DNA it is subject to an inumerable number of attacks.  Unlike in biology mutations are not likely to just randomly occur in a computer this is by design, so when we use our computers we expect them to work as designed and without mutation.</p>
<p>Unfortunately there are others out there who thrive on producing mutations.  I will describe them as the &#8220;Cult of Cthulhu&#8221; helping to unleash a beast from within, and reak havoc on those that occupy cyberspace.  Now I am not suggesting these people are bad.  On the contrary these people are there to awake the ancient monster.  Perhaps they are just misguided, but on occasion they release his daemons.  And we get a glimpse of the whole &#8211;  A glimpse of how to prevent the beast from ever comming to be. This helps us to understand the mutations, to protect against future mutations and to perhaps stop the beast.</p>
<p>I swear to no innate knowledge or ability that is better than the next.  I can only claim two things; To do as I can and to understand as much as I can.  I am a beginner as far as actively researching security and I&#8217;m learning an incredible amount as of late.  I&#8217;ve been quite familiar with the internal operations of the beast or machines for some time.  And hope to be enligtened and to enlighten others.</p>
<p>&#8220;That is not dead which can eternal lie.&#8221;  That is what we are up against.  <em>Cthulhu fhtagn</em> &#8211; Indeed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.securiteam.com/index.php/archives/625/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

