<?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>TAZ: TheTAZZone Network &#187; log files</title>
	<atom:link href="http://www.thetazzone.com/category/security-tutorials/log-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thetazzone.com</link>
	<description>Welcome to Internet Chaos: 960+ Games; Security, Networking, and General Tutorials; IRC Chat; and an Active Forum Community</description>
	<lastBuildDate>Sat, 21 Nov 2009 13:25:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tutorial &#8211; A Tale of Two Logfiles (Final)</title>
		<link>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-final/</link>
		<comments>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-final/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:23:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[log files]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.thetazzone.com/?p=666</guid>
		<description><![CDATA[ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM HERE
Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to [...]]]></description>
			<content:encoded><![CDATA[<p>ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM <a href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=676">HERE</a></p>
<p>Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network</p>
<dl class="codebox">
<dt>Code: <a onclick="selectCode(this); return false;" href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=676#">Select all</a></dt>
<dd><code>Tiger Shark from Antionline has kindly given his permission for his tutorial to be hosted at The Taz.</p>
<p>You can find the original post here:<br />
http://www.antionline.com/showthread.php?s=&amp;threadid=259056</p>
<p>Enjoy<br />
</code></dd>
</dl>
<p>Subtitle: How Proper Procedure and Comprehensive Logging make an Administrators job easier.</p>
<p>This is a story. It&#8217;s fictional and not necessarily factually/technically correct in all cases but I am using it to demonstrate two things that are very important to an administrator, the procedure and the logs. Both go hand in hand in the event of a compromise and both must be in place prior to the event itself. The proper planning prior to the event will speed up the investigation and save time and therefore money in the &#8220;clean-up&#8221; and mitigation of the breach.</p>
<p>Throughout the story you will find numbers in []. They point to the notes at the end of the story. The notes are meant to show what the participants did right or wrong, what should have been done prior to the event or what could have been done better.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>During his mammoth reading task Dirk determined that he had found a reverse telnet connection by using Netcat to make the connection out through the firewall on port 80 and then spawning a command prompt that could be controlled from the remote computer. He had further decided that what he had seen in the transaction logs was a form of SQL injection that was used to enumerate the tables and their content until an administrative login name and password could be returned. From there he concluded that the rest was trivial. He looked at his watch. It was now 9:30pm. He walked down to Mike&#8217;s office and found him still there on the phone. He waited for several minutes while Mike finished his call.</p>
<p>&#8220;You know, I think we have it. I won&#8217;t go into the details but I know how he got in, what he did when he was here and thus how he stole the information. I also think I have the IP address of his computer. Did you hear from him again yet?&#8221;<br />
&#8220;No, and to be honest I don&#8217;t think we will before tomorrow&#8221;<br />
&#8220;Then maybe we have time to call the authorities and have them deal with him.&#8221;<br />
&#8220;You think so? Er&#8230;. what does this IP address thing give us?&#8221;<br />
&#8220;It&#8217;s the unique address of the computer on the internet that he carries out the attack from&#8221;.<br />
Mike paused for some while. &#8220;You think we can pull it off?&#8221;<br />
&#8220;It wouldn&#8217;t be up to us but we need to give the FBI as much time as we can. I&#8217;d say it&#8217;s now or never. I have the phone number for the local office right here.&#8221;<br />
Mike thought again and finally, resignedly said &#8220;No. Sorry, this stays in-house.&#8221;<br />
&#8220;It&#8217;s your company Mike&#8230;.. Your decision&#8221;</p>
<p>Dirk was a little angry as he walked back to his office. He wanted a piece of this thief that had come into his network and made him look bad. &#8220;Well, he&#8217;s not coming back in.&#8221; he thought as he diverted over to Amy&#8217;s office switched on her computer and deleted the offending files and the scheduled task. &#8220;There, screw you&#8230; asshole&#8221;.</p>
<p>Earlier Gary had set up the monitoring for any internal traffic directed at port 80 and had sat back to think about how he was going to lock out the access when he needed to. He knew he had eighteen machines here and one other in the Cincinnatti office. How would he find out how many other boxes there were? His mind was wandering and the two thought processes collided. &#8220;Oh Duh&#8230;.&#8221; he thought, &#8220;Why not just do an &#8216;Al&#8217;? Scan the subnets for port 80 after six in each time zone. They&#8217;ll show up on my monitor but I&#8217;ll be able to recognize mine by the source address. Perfect&#8221;. He was left with one other problem. How to determine if there were more than one access point. &#8220;The firewall logs are going to show me that.&#8221; he thought as he picked up the phone to Cincinnatti. He spoke to the admin there and requested the command line for the scheduled job on Dan Ereg&#8217;s machine. A few minutes later the phone rang.</p>
<p>&#8220;Gary speaking&#8221;<br />
&#8220;It&#8217;s Tim in Cincinnatti. I have your command line.&#8221;<br />
&#8220;I just need the IP address it connects to.&#8221;<br />
&#8220;No IP address, it&#8217;s pointed at a domain name, al.attacker.com&#8221;<br />
&#8220;Ok, he probably wants to be able to move, thanks&#8221;</p>
<p>After putting the phone down he went to the Secure Logging System and filtered the previous month&#8217;s logs for the IP address he had resolved through nslookup. There they all were. &#8220;Damn, this guy sucks. He&#8217;s so predictable. Always port 80, always 6:00pm in the time zone and only three machines. Well that will make the cleanup easier&#8221; he thought. Just to be sure Gary then filtered the logs for the previous month against the internal IP addresses and looked at the transactions immediately after six pm each night. He found they all pointed to the same address, al.attacker.com except one, the very first. &#8220;Noooo&#8230; It can&#8217;t be.&#8221;, he thought &#8220;He can&#8217;t be this frigging dumb&#8230;. Can he?&#8221; He quickly ran a Whois against the IP and found it was a common high speed ISP. &#8220;C&#8217;mon now.&#8221;, he thought, &#8220;Let this be my lucky day&#8221;. He opened google and entered the IP address. &#8220;Oh Baby, twelve hits&#8221;. They were mostly abuse reports from different locations. &#8220;Sweet, a pattern, this guy has been practicing from home and got himself noticed before&#8221;. The eighth one down really caught his eye. It was an email to a list which, (as many do), contained the headers. There was an email address too. Better yet the email address showed as a real name, &lt;Joshua Albin&gt;. &#8220;Well what have we here&#8230;. It&#8217;s &#8216;Al&#8217;&#8230;&#8221; Gary laughed out loud as he reached for the company phone book. He quickly looked up the number for the President of the Board and dialled it.</p>
<p>&#8220;The President&#8217;s office, Julie speaking, how may I help you?&#8221;<br />
&#8220;Er, yeah, hi, it&#8217;s Gary Cunez, Corporate Computer Security Manager. I really need to talk to the president, like, er&#8230;., right now, is he available?&#8221;<br />
&#8220;One moment please&#8221; as Julie placed him on hold.<br />
A few moments later he was talking to the President.<br />
&#8220;Gary, This is Bill Smoltz, the president, what do you have for me?&#8221;<br />
&#8220;Sir, I&#8217;m pretty sure I have &#8216;Al&#8217;. His name is Joshua Albin. With some assistance from his ISP, HighSpeedAtHome.com, I think we can give the authorities an address.&#8221;<br />
&#8220;How did you manage that. I thought these people did everything they could to hide themselves?&#8221;<br />
&#8220;I won&#8217;t go into detail but he is pretty sloppy and made a single, rather large mistake. It took only a couple of minutes of digging which showed a pattern of abusive behaviour and, more importantly an email address.&#8221;<br />
&#8220;So what do you want me to do?&#8221;<br />
&#8220;Let&#8217;s bring in the FBI. With this amount of information they could have him in hours and he would be out of our hair. Not to mention the fact that if he&#8217;s only asking for ten thousand he&#8217;s probably running the same trick against others. We can help ourselves and others.&#8221;<br />
&#8220;It&#8217;s a bit late Gary. Two hours ago a company statement was Fedex&#8217;ed overnight to all our investors stating that their accounts were frozen without each transaction being accompanied by a code issued with the statement and that the company would not deal with blackmailers or other fraudulent activities now or in the future.&#8221;<br />
&#8220;Sir, that&#8217;s ok. How do you think the investors would feel if they received a second statement within twenty four hours telling them to relax, we caught him? I have him Sir, I know it.&#8221;<br />
&#8220;You do have a point.&#8221;, Bill hesitated, &#8220;Ok, you call the FBI and give them what you have. I have some more calls to make now. I&#8217;ll get back to you&#8221;<br />
&#8220;Thank you Sir. I really feel good about this&#8221;</p>
<p>Early the next morning Agent Hicks sat for two hours with Gary as he went over the evidence he had collected. Gary finished up by showing him the first IP address, the ISP, the Google results indicating a pattern from the IP address and finally the email.</p>
<p>&#8220;I think you have him there Gary my man&#8221;, Agent Hicks smiled, &#8220;You are even luckier than you think. I&#8217;ve worked with HighSpeedAtHome before, several times. They are great record keepers like yourself. This may only take a phone call or two to start my little ball rolling.&#8221; He grinned broadly.<br />
&#8220;Phew, I&#8217;m glad. It&#8217;s a gut feeling that this is the guy but everything points to the owner of that IP being a bad kid in cyberspace.&#8221;<br />
&#8220;I can&#8217;t argue with you there. Can I use your phone?&#8221;<br />
&#8220;Yeah&#8221;</p>
<p>Agent Hicks made a couple of calls. &#8220;Ok, I know who I need to talk to now,&#8221; he said, &#8220;Let&#8217;s see what HighSpeedAtHome have for us&#8221; as he dialed the number he just noted down.</p>
<p>&#8220;Yeah, Hi, Marvin Brenner please&#8221;<br />
&#8220;Yes, I&#8217;ll hold&#8221;</p>
<p>Hicks waited.</p>
<p>&#8220;Yeah, Marvin Brenner? Hi, This is Agent Hicks of the FBI, you should have been informed that I would be calling&#8221;<br />
&#8220;Good. I need to know if there have been connections between the following two IP addresses in the last month. Can you do that?&#8230;.. Good&#8221;. Agent Hicks read off Gary&#8217;s Cincinnatti IP address and that of Joshua Albin. A minute or so went by and he began listening again.<br />
&#8220;Good&#8230;. Ok, can you confirm that there were no other connection attempts to the second address I gave you just before or after that connection was made&#8221;. Another long pause ensued.<br />
&#8220;Ok, the second IP address had two attempted connections on port 1433 five minutes after the connection in question. Can you look at the source address of the port 1433 attempt and tell me if this was a single instance or part of a scan?&#8221;<br />
&#8220;Ok, so you are saying that three weeks ago today at 6:00pm almost exactly the first IP address connected to the second on port 80 and that apart from a confirmed portscan for an SQL server from an unrelated source which touched the second IP address there were no other connections in or out for more than an hour&#8230;. Great, I want you to hold the logs because there will be a subpoena for them before you finish work. One final thing, a yes or no question, is the subscriber&#8217;s name Albin&#8230;..&#8221; another pause, &#8220;William Albin. Great, I&#8217;ll be seeing you soon, Bye.</p>
<p>Agent Hicks hung up and turned to Gary.</p>
<p>&#8220;Nice work&#8230;. It&#8217;s &#8216;Al&#8217; all right, no question. The dumbass made the first connection go to his home. I have to go, I&#8217;ll be in touch&#8221;</p>
<p>It was 5:30 pm and Joshua was bored. He&#8217;d spent most of the day trying to work out how he was going to get the money without giving himself away and still wasn&#8217;t any better off. Since leaving school two years before and deciding college wasn&#8217;t for him he had wandered, unsuccessfully, from job to job. His current employment was the graveyard shift cleaning a large hotel&#8217;s kitchen and he hated that too. The doorbell rang downstairs. &#8220;Screw it,&#8221;, he thought, &#8220;the old man can get it&#8230;. he needs the exercise&#8221;. He heard the door open and some muffled conversation.</p>
<p>&#8220;Josh, Can you come here a minute&#8221; William Albin called up the stairs<br />
&#8220;What now dad, I&#8217;m busy&#8221;<br />
&#8220;It&#8217;s a girl to see you son&#8221;<br />
&#8220;Er, just a minute&#8221;</p>
<p>Agent Hicks nodded thanks to William for not alerting his son. Joshua appeared round the corner and was confronted by two &#8220;suits&#8221; and two badges.</p>
<p>&#8220;FBI Joshua. Please be calm, we just need to ask you some questions&#8221;. Before Joshua could speak Agent Hicks reminded him of his right to silence and a lawyer. Joshua&#8217;s only comment was to his father, &#8220;I wasn&#8217;t going to take the money Dad, I was just showing them how vulnerable they are&#8230;. Dad&#8230;.&#8221;</p>
<p>Agent Hicks colleague took Joshua to the waiting car while Agent Hicks went upstairs and removed a computer and a laptop from Joshua&#8217;s room.</p>
<p>Gary took the phone call from Agent Hicks.</p>
<p>&#8220;We have him and his computers. No doubt it was him, he partially confessed to his father when we arrested him. I&#8217;m going to be busy for a while, I&#8217;ll get back in touch when I have what I need. Just make sure that your evidence stays clean, ok&#8221;<br />
&#8220;Yeah, no problem, it stays where it is&#8230;. and thanks&#8221;<br />
&#8220;No problem, you made our job real easy, bye.</p>
<p>Gary called the President again and informed him of the developments. The second statement was already prepared and was sent out to all the investors.</p>
<p>An hour later in Seattle Dirk and Amy were just ordering dinner while he tries to explain the technicalities of how the attacker was causing her machine to connect to his and then have him control it. He felt pretty good about the whole thing. He had found the compromise, worked out how the attacker was doing it and had even found the attackers computer. Yep, he was &#8220;The Boy&#8221; and he was going to leverage that all he possibly could with Amy tonight.</p>
<p>Mike sat in his office at TFCU. &#8220;It&#8217;s getting late he thought&#8221; as he looked at the clock in the system tray of his computer. He noticed it change from 5:59 to 6:00pm. What he didn&#8217;t notice was the flicker of the drive light under the desk as his computer sent a DNS request for al.attacker.com followed by a SYN&#8230;&#8230;..</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
The Synopsis</p>
<p>Subsequent investigation and questioning of Joshua proved that the initial breach took place through a malicious script disguised as an enticing spam message sent to select members, (usually high ranking company officers), that insinuated itself into the local security zone of the machine and downloaded Netcat disguised as msbackup.exe and created the scheduled job for 6:00pm each evening to set up the reverse connection through port 80 on the firewall thus making it hard to detect and even harder to stop. From there Joshua had used other tools to elevate his privileges and compromise numerous machines throughout his &#8220;conquered&#8221; networks. It was then simply an issue of determining where the financial information was kept and how to get the required authentication information or use other methods such as SQL injection to get the data he required.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
The Lessons</p>
<p>Dirk&#8217;s a nice kid and not a bad admin, but he was utterly unprepared. It wasn&#8217;t his fault. We&#8217;ve all seen it, whether it be a new job or simply going to help a friend. The network that was never built with a cohesive plan in mind. It takes months to learn it and maintaining it at the same time means things simply &#8220;go by the wayside&#8221;. Dirk found himself in a stressful situation which he had no experience with and, worse yet, had no plan to try to address the problem. People say that &#8220;information is power&#8221; and it is true. Logfiles are information. Therefore logfiles _are_ power. Even if you are unprepared for a situation a comprehensive logging system can allow you to &#8220;muddle through&#8221; without the nicely documented plan your boss would like to see that will still probably contain &#8220;holes&#8221;. The holes can be filled by the information in the logfiles. As hard as Dirk tried his efforts were stymied by the lack of information. That lack of information coupled with a lack of understanding of how the attacker works led him to believe that he had a clean network, that he knew what had occurred and where the attacker was attacking from. The reality is he was left with a dirty network, he had no way of knowing that other machines were compromised, he didn&#8217;t understand that Joshua wasn&#8217;t attacking him from his own computer and he didn&#8217;t know that Amy&#8217;s machine was a &#8220;jump off&#8221; point inside his own network, (though in this case Joshua did use her machine to get the data he needed, logs may have shown him a different picture).</p>
<p>Gary has an advantage over Dirk. His company employs him to do the security. He&#8217;s been there for a while and he&#8217;s built his security architecture himself. He monitors the network, he logs it heavily and he wrote his procedures while he had time to research them. He also watches what the potential attackers can do and adjusts his systems accordingly. So when the &#8220;bad thing&#8221; happens he can move in, confident that unless the attack is extraordinary he has a good chance of piecing it all together. Gary ended up with a clean network, sufficient information to put Joshua in jail for three years and a handsome pay raise, (ok, I lied a little ).</p>
<p>There is no reason why the &#8220;average&#8221; admin can&#8217;t accomplish what Gary did. It starts with looking at each part of the network and each project you take on from a security standpoint. Simple questions like &#8220;Can I log these transactions somewhere?&#8221;, &#8220;How could this be exploited?&#8221;, &#8220;Can I know who connects to this and when&#8221;, at the start and both implementing and documenting everything you can goes a long way to helping you when the &#8220;proverbial&#8221; hits the fan. Computers are cheap and drive space is cheaper. An old PC with a nice big 80 Gig drive is &#8220;chump change&#8221; today. Couple that with a CD writer to archive the logs to at less than $0.50 per CD and your ability to log your system properly is acheived in less than $2-300. What&#8217;s the problem?</p>
<p>&#8220;Google it&#8221; is a mantra amongst security aware admins, and it&#8217;s a good one. I would propose another mantra. &#8220;If it communicates, log it&#8221;. I wouldn&#8217;t want to be blind in my real life, why would I want to be blind in my cyber life?</p>
<p>Finally, (&#8221;Thank god&#8221; yells the crowd), think about this beforehand. You have time during your commute, over lunch or even in the shower. When things start coming together use any other spare time to create your &#8220;procedure&#8221;. It might not be perfect but it will make the stress managable and it might, with good logs, help you do what you need to do&#8230;. Which is better than running around like a headless chicken while the sky falls&#8230;&#8230;</p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->

]]></content:encoded>
			<wfw:commentRss>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial &#8211; A Tale of Two Logfiles, (Part III)</title>
		<link>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-iii/</link>
		<comments>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-iii/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 21:22:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[log files]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.thetazzone.com/?p=664</guid>
		<description><![CDATA[ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM HERE
Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to [...]]]></description>
			<content:encoded><![CDATA[<p>ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM <a href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=675">HERE</a></p>
<p>Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network</p>
<dl class="codebox">
<dt>Code: <a onclick="selectCode(this); return false;" href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=675#">Select all</a></dt>
<dd><code>Tiger Shark from Antionline has kindly given his permission for his tutorial to be hosted at The Taz.</p>
<p>You can find the original post here:<br />
http://www.antionline.com/showthread.php?s=&amp;threadid=259017</p>
<p>Enjoy<br />
</code></dd>
</dl>
<p>Subtitle: How Proper Procedure and Comprehensive Logging make an Administrators job easier.</p>
<p>This is a story. It&#8217;s fictional and not necessarily factually/technically correct in all cases but I am using it to demonstrate two things that are very important to an administrator, the procedure and the logs. Both go hand in hand in the event of a compromise and both must be in place prior to the event itself. The proper planning prior to the event will speed up the investigation and save time and therefore money in the &#8220;clean-up&#8221; and mitigation of the breach.</p>
<p>Throughout the story you will find numbers in []. They point to the notes at the end of the story. The notes are meant to show what the participants did right or wrong, what should have been done prior to the event or what could have been done better.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8220;It wasn&#8217;t a voice I recognized&#8221; Mike said to Dirk who was standing nervously in the doorway.<br />
&#8220;You mean you don&#8217;t think it&#8217;s an employee then?&#8221;<br />
&#8220;I know practically everyonehere and the voice just doesn&#8217;t fit, no-one has an accent like that here&#8221;<br />
&#8220;Well, then it does point to a &#8220;call home&#8221; program then. I looked at where the email came from and it was Amy&#8217;s.&#8221;<br />
&#8220;Amy? She&#8217;s been here forever.&#8221;<br />
&#8220;Well like you just said it doesn&#8217;t seem like an inside job and Amy doesn&#8217;t sound like a man either&#8221;<br />
&#8220;Oh, yes, you&#8217;re right. So he want&#8217;s ten thousand dollars or he starts using the accounts.&#8221;<br />
&#8220;Well we can&#8217;t close all the accounts and issue new one&#8217;s. That would tell everyone we were compromised&#8221;<br />
&#8220;Can you find this &#8216;Al&#8217;? I saw a program on TV once about how a spy was caught. Can we do that?&#8221;<br />
&#8220;I don&#8217;t think so. I need to look at Amy&#8217;s computer but finding the information I would need is going to be difficult. I could really use some log files but I took a quick look around and where there are any logs they overwrite themselves when they fill up which sometimes seems to be overnight on some machines.&#8221; [16]<br />
&#8220;So you&#8217;re saying that without logs you may never know where all this came from?&#8221;<br />
&#8220;Basically, yes. They are one of those things that always seem to get the low priority. I&#8217;m guessing the previous contractors had better things to do than to bother with them.&#8221;<br />
&#8220;So we don&#8217;t have a lot of choice then? We are going to have to pay&#8221; Mike said glumly.<br />
&#8220;Give me some time, maybe I&#8217;ll get lucky. Maybe Al is a little sloppy. When does he want the money?&#8221;<br />
&#8220;I don&#8217;t know, he said he&#8217;d contact me soon&#8221;<br />
&#8220;Let me look around. Call me when you know more, ok?&#8221;<br />
&#8220;OK, I have some calls to make, get back to me if you find anything&#8221;<br />
&#8220;Will do.&#8221;</p>
<p>Gary asked Bill Steel to call an emergency board meeting for 2:00pm today. He needed the &#8216;ok&#8217; from the board to move to &#8220;investigative&#8221; pace. He had explained to the IRT that while the probability was high that he would find the outside locations that the attack had been initiated from the chances are that they were zombies being used by Al to mask his true location and identity. The recommendation would be that the company pay Al and move on. It irked Gary a little but he knew that the chances of successfully finding and being able to prosecute were minimal and that calling in the FBI would affect the company badly since the theft would become public once they were called in. [17]</p>
<p>Arriving back at his office Gary decided to take a look and see who&#8217;s computer in Cincinnatti was carrying out the scan. A quick check of his DHCP logs indicated that on the day and time of the scan the computer belonged to the manager of the Cincinnatti office, Dan Ereg. &#8220;Interesting.&#8221; thought Gary not doubting that Dan wasn&#8217;t Al but beginning to wonder how pervasive this attack was. &#8220;I do hope he hasn&#8217;t been hopping from box to box for weeks,&#8221; he thought, &#8220;that&#8217;s going to be a real pain not to mention the fact that I&#8217;m going to have to explain why I didn&#8217;t notice it&#8221;. [18]</p>
<p>Dirk sat forlornly in front of Amy&#8217;s computer. He&#8217;d opened the event logs to find nothing. &#8220;This really sucks,&#8221; he thought, &#8220;those contractors are useless&#8230;. they didn&#8217;t even turn on auditing. Jesus, all they had to do was set the domain policy&#8230;. Less profit in doing it right I guess&#8221;. Amy&#8217;s voice brought him back from his angry thoughts.</p>
<p>&#8220;You don&#8217;t look very pleased&#8221; she said, &#8220;Is it something I&#8217;ve done?&#8221;<br />
&#8220;No, I don&#8217;t think so. I&#8217;m peeved at the old contractors. I&#8217;m trying to find something that should be easy had they done their job correctly&#8230;. But they didn&#8217;t&#8221;.<br />
&#8220;What are you looking for, maybe I can help&#8221;<br />
Dirk laughed, &#8220;I don&#8217;t think you could help me, I don&#8217;t know what it is I&#8217;m looking for myself&#8221;.<br />
&#8220;That doesn&#8217;t make much sense,&#8221; Amy replied, &#8220;How do you even know you should be looking for something then?&#8221;<br />
&#8220;Ahhh&#8230; It&#8217;s a long story. Maybe I can tell you some other time, when I get this all cleared up&#8221;.<br />
&#8220;Oh please, you&#8217;ve certainly got my curiosity up&#8221; she smiled. The double meaning went right over Dirk&#8217;s head&#8230;&#8230;.</p>
<p>Dirk went back to looking around her computer. He was lost and he knew it. &#8220;This is bloody silly,&#8221; he thought, &#8220;Thirty thousand files or more and no idea where to start. If I&#8217;m not careful it&#8217;s going to look like Amy did it and I can&#8217;t believe that.&#8221; He wandered aimlessly around Amy&#8217;s computer for another twenty five minutes and was ready to give up when he opened the task manager. Looking slowly down the list it struck him as odd that mstask.exe was running. &#8220;What&#8217;s this?&#8221; he thought, &#8220;The scheduler is running&#8221;. he opened the task scheduler and there was a single entry named &#8220;Daily Backup&#8221; set to start at 6:00pm daily. &#8220;Hmmm, it ran last night at 6:00 and it is due to run again at 6:00. What&#8217;s it doing?&#8221;. He quickly checked the properties. What he found made him sit up suddenly. The task was scheduled to run a program from the system32 folder called &#8220;msbackup.exe&#8221;. &#8220;Got it.&#8221; he thought, &#8220;Microsoft&#8217;s backup program is &#8220;ntbackup.exe&#8221;. This must be a trojan. There&#8217;s an IP address amongst all the switches. I wonder where that is?&#8221;. He quickly made a note of the address and returned to his own workstation. He &#8220;pinged&#8221; the IP address and got a response. &#8220;Cool,&#8221; he thought, &#8220;It&#8217;s up. Now what?&#8221; [19]</p>
<p>Gary looked up as the technician knocked on his door carrying a copy of Mike Panoff&#8217;s imaged drive and a manifest detailing what had occurred and where the other drives were currently located. He thanked the technician, filed the manifest after checking it to make sure things were in order and placed the drive in his machine. He went straight to the scheduled task which he found to be called &#8220;Daily Backup&#8221;. &#8220;No reason for that whatsoever&#8221; he thought as he looked to see what the executable was. &#8220;Now that&#8217;s an interesting command line&#8221;, he thought. &#8220;msbackup -l 80 -e cmd.exe&#8230;.. that looks all too like Netcat&#8230; running as system too because of the scheduler, ouch, nice one.&#8221; He made the appropriate notes and moved to the event logs. There he found new processes being started just after the portscan had taken place. &#8220;VNC was run not long before the access to the financial database.&#8221;, he thought, &#8220;OK, so he&#8217;s even making himself a desktop to work from. Lets take a look at the VNC executable&#8221;. He opened Explorer and went to the path shown in the event log. Nothing. &#8220;Ok, let&#8217;s try the recycle bin?&#8221; he thought as he switched to it and found it immediately. &#8220;Great, the deleted time was not long after the data was stolen.&#8221; He further noted that there were a couple instances of the VNC executable over the previous few days. &#8220;Hmm&#8230; He downloads a new version each time. I hope he only uses Dan&#8217;s machine as his first stop internally&#8221;. He sat back to think for a minute. &#8220;Why was he portscanning for port 80? He has to know he has Netcat on Mike&#8217;s box&#8230;.&#8221;. It took a full three minutes before the possible answer came to him. &#8220;He can&#8217;t guarantee which computers will be left on after work&#8230;.. Shit, he has several machines&#8230;.. I bet there are 18 machines total&#8230;.. I need that portscan log again&#8230;.&#8221; [20] He called the network admin and asked that all 18 machines on the list be checked for the scheduled job and was surprised when, just 45 minutes later, the admin was standing at his door with log files of his technicians activity on each machine as Gary had requested.</p>
<p>&#8220;You were spot on.&#8221;, he said, &#8220;Every box has the same scheduled job. Busy little beaver that hacker friend of yours eh?&#8221;<br />
&#8220;Jeez&#8230;. He wanted to guarantee access didn&#8217;t he?&#8221;<br />
&#8220;So what do you want me to do. I can&#8217;t pull all the boxes, I don&#8217;t have replacements.&#8221;<br />
&#8220;Yeah, I know&#8230;. tough one&#8230;. The board meeting is in 5 minutes so I can&#8217;t say right now. We&#8217;ve recommended no action so we can move faster but the board has to ratify that. Until then I&#8217;m supposed to work as if we were going to court with this stuff. Then again, if we have good evidence on Mike&#8217;s box and we pick up the box in Cincy, we should be good in a court, anything else we have should just be additional nails in the coffin so just documenting the other machines should be good. It&#8217;s something I&#8217;d have to check with the legal beagles if the board wants us to go after him but we should know in an hour or so. Let&#8217;s just wait till then.&#8221;<br />
&#8220;Ok, he&#8217;s a pretty bad hacker though isn&#8217;t he? He&#8217;s leaving clues all over the network.&#8221;<br />
&#8220;Yeah, I would have expected better, even the log files were intact. Hopefully he won&#8217;t be any more careful with the box or boxes he uses to enter the network&#8221;</p>
<p>Dirk was now uncertain where to go from here. He&#8217;d found the attacker&#8217;s computer in the internet, it was up and running and he was somehow controlling Amy&#8217;s machine to do whatever he was doing to get to the financial data. &#8220;I need a plan,&#8221; he thought &#8220;this can&#8217;t be the first time something like this has happened, someone has to have seen this before&#8230;..&#8221; Finally, the &#8220;light bulb&#8221; came on&#8230;. &#8220;Google&#8221; he thought, &#8220;I&#8217;m a genius&#8230;.&#8221;. He scrambled over to his workstation, opened IE and went to Google. He typed &#8220;incident response methodology&#8221; and clicked &#8220;search&#8221;. &#8220;Oh Hell. 201,000 hits&#8230;..&#8221; He added the word &#8220;windows&#8221; and re-searched. &#8220;That&#8217;s better&#8221; he thought, &#8220;cut that down to nearly 42,000 hits. Shit, I&#8217;m going to be reading all night&#8230;.&#8221; Despite the seemingly overwhelming task Dirk felt a kind of warmth. He wasn&#8217;t alone, he wasn&#8217;t the first victim and there was a lot of information out there about how he should proceed. &#8220;Damn, I probably should have done this earlier.&#8221;, he thought. [21]</p>
<p>&#8220;You have got to be shitting me&#8221;, Gary said, &#8220;Do they know what that will do?&#8221;<br />
&#8220;Look Gary, that&#8217;s the decision of the board. They want you to go as far as possible and then they will call the FBI.&#8221; Bill said.<br />
&#8220;You explained that our chances of finding this asshole is close to zero didn&#8217;t you?&#8221;<br />
&#8220;Yeah, but the feeling is that if we give the ten grand he&#8217;ll be back anyway. Eventually he&#8217;ll drop the information somewhere and then we&#8217;re screwed regardless. They feel it is better to face the issue head on, tell the investors about the leak and do everything to minimize the damage. The PR people are already working on the issue. Sorry, but you get to stay on the slow track&#8221;<br />
&#8220;Hell, I have eighteen boxes I have to drag off the network already&#8230;. Should we just close up shop now?&#8221;<br />
&#8220;Eighteen, how?&#8221;<br />
&#8220;It&#8217;ll take me too long to explain but he has eighteen boxes on this network alone he can connect to and control, never mind the other offices.&#8221;<br />
&#8220;Nice, very nice&#8230;.. Can we handle that?&#8221;<br />
&#8220;I dunno, listen, I have a thought, what do you think? I&#8217;ll just leave the boxes up, I already took down Mike&#8217;s but that should be ok, he expects boxes to be turned off sometimes. If I leave the other boxes alone and let things happen as they will can we still hold up in a court? I want to just put a monitor on all of them and see if he comes back. If we maintain a proper evidence trail on the boxes we have can we allow the other boxes to be tainted and still win on the off chance we ever get this shit into a court?&#8221;<br />
&#8220;If your solid on the evidence trail of the boxes you have right now and can show his activity from your monitors I&#8217;ll argue it with any defense attorney but I need a rock solid place to start and I&#8217;ll need good data to back up our decision. Can you provide that for me?&#8221;<br />
&#8220;I think so, but you&#8217;re the legal beagle&#8230;. Do you trust me is the question?&#8221;<br />
&#8220;Er&#8230;. Oh, to hell with it&#8230;. Go for it&#8230; Make sure you are letter perfect on the procedure with everything you do. I need everything documented and I need you to be able to show reasoning. You do that and I&#8217;ll back you and argue it in any court if we can get it there&#8221;<br />
&#8220;Thanks, I appreciate that. I&#8217;ll set up the monitors now, the jobs will kick off in, um, one hour, twenty three minutes&#8230;. I&#8217;ll be ready&#8221;<br />
&#8220;Good, and good luck&#8230; to us all&#8221;<br />
&#8220;Yeah, we need some, bye.&#8221; Gary said as he put the phone down. [22]</p>
<p>&#8220;Now this really sucks&#8221; he thought. &#8220;I really don&#8217;t like this&#8230;. I&#8217;d rather close all this down now&#8230;..&#8221;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
The Notes:-<br />
[16] Dirk is beginning to realize that the log files on a network are his eyes. When log files don&#8217;t exist or overwrite themselves when &#8220;full&#8221; he is blind. All manner of things could have gone on throughout his network minutes before the log began overwriting itself and he would have no way of knowing it.</p>
<p>[17] No matter how good a sleuth you think you are you must realize that once the trail leaves your network it also leaves your logging systems. Once this has occurred the trail will most probably &#8220;dead end&#8221; fairly quickly. Your task is also to operate in the best interests of your company rather than follow your desire for revenge against your &#8220;violator&#8221;. The IRT&#8217;s recommendation to the board must be realistic and take into account the various aspects of the whole and their repercussions.</p>
<p>[18] Whether you have the best logging systems in the world or not you can&#8217;t expect to find every little thing. Even on relatively small networks the traffic volume can be huge and diverse. A good attacker will try to utilize &#8220;normal&#8221; traffic patterns to mask his malicious activity. Accept the fact that network traffic is extremely complex and unless you packet capture everything on the network you are going to have holes in your logs that may allow malicious traffic to slip by. Do your job, if you have thought about this situation previously and tried to make sure that you log the &#8220;right&#8221; things you should still be able to piece a trail together. It may not be complete but it will tell you were &#8216;Al&#8217; has been which makes cleanup a lot easier.</p>
<p>[19] Bad move Dirk. He might as well have called Al and told him he had found one of his tools. You shouldn&#8217;t make any direct contact with remote machines at any time during the investigation until you have collected all the information you can. Once you have that information use a dial up connection to another ISP or go and use your home computer to look at the remote machine. You have to be very careful wherever you take a &#8220;peek&#8221; from. Al is in the process of committing a crime. One that could cost your company a lot of money and more importantly put him in jail with a nice cell-mate called Bubba. He&#8217;s going to be more than a little suspicious about probes against his machine(s). You really don&#8217;t want to force his hand and have him release the information for example when you were trying to keep the compromise quiet.</p>
<p>[20] While there isn&#8217;t always a good reason for things appearing in logs there are often sane ones. Gary nearly bypassed the reason for the portscan and may have become sidetracked by more &#8220;exciting&#8221; tasks. It&#8217;s important to look at each event that is relevant to the attack and try to determine why it occurred. Gary got lucky, the thought occurred to him after the fact and he didn&#8217;t dismiss the question. Had he done so he wouldn&#8217;t have found all the holes in his network. It helps to try placing yourself in the position of the attacker and work backwards. Why would I portscan this subnet from Cincinnatti trying to find my own Netcat? That question may come up with an answer much quicker than &#8220;Why would he be scanning me internally&#8221;? The difference is subtle but if you can place yourself in a position where the attackers &#8220;problems&#8221; become your&#8217;s you may speed up the process.</p>
<p>[21] No matter what is happening. No matter how stressful it might be, you aren&#8217;t alone and you aren&#8217;t the first to have been cracked and have the company&#8217;s data and it&#8217;s reputation on the line. No matter how well prepared you are you will most probably be ill-prepared for something that turns up. Let&#8217;s face it, few of us are full time network security analysts with daily excursions into the world of forensic investigation. Most of us are network admins who rotate ten different hats every day. But that&#8217;s ok, Google will help. It&#8217;s a mantra repeated hourly in the computer security world, &#8220;If in doubt, Google it&#8221; or &#8220;Google is your friend&#8221;. Learn it and live it. Again, it is better to spend time finding out what you _need_ to know to be successful than to ruin your chances of ever being successful.</p>
<p>[22] Unless it&#8217;s your company and your money things aren&#8217;t always going to go your way. You might understand how low the chances of finding the attacker are going to be but it is the board&#8217;s decision as to how they run the company and what may serve it&#8217;s interests best. You give the best advice you can, you are clear about your abilities and your inabilities and you let them make their decision&#8230;. It&#8217;s their business and that&#8217;s why they get the &#8220;big bucks&#8221;. It&#8217;s important that they know your weaknesses as well as your strengths. It may seem foreign to be telling your bosses that you &#8220;suck&#8221; at something but it is information they need to know. Suggest that they hire a contractor to help you in your areas of deficiency. The important thing is that you reach the truth. Unless they are utter idiots they will appreciate your proactive approach to _their_ problem and your understanding of your own deficiencies. It might sound like &#8220;falling on your sword&#8221; for the good of the company but if they don&#8217;t understand and appreciate your committment I can assure you there are better places for your talents.</p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->

]]></content:encoded>
			<wfw:commentRss>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial &#8211; A Tale of Two Logfiles (Part II)</title>
		<link>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-ii/</link>
		<comments>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-ii/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 21:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[log files]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.thetazzone.com/?p=662</guid>
		<description><![CDATA[ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM HERE
Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to [...]]]></description>
			<content:encoded><![CDATA[<p>ORIGINALLY POSTED BY NOKIA FOR THETAZZONE/TAZFORUM <a href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=674">HERE</a></p>
<p>Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network</p>
<dl class="codebox">
<dt>Code: <a onclick="selectCode(this); return false;" href="http://tazforum.thetazzone.com/viewtopic.php?f=28&amp;t=674#">Select all</a></dt>
<dd><code>Tiger Shark from Antionline has kindly given his permission for his tutorial to be hosted at The Taz.</p>
<p>You can find the original post here:<br />
http://www.antionline.com/showthread.php?s=&amp;threadid=258977</p>
<p>Enjoy<br />
</code></dd>
</dl>
<p>I really apologize for the long period between &#8220;episodes&#8221;. It was due to two factors:-</p>
<p>1. Radisson Hotels and Orlando International Airport in Florida are somewhat retarded. No wireless at the airport, and a choice between internet over the TV or 89 cents a minute to dialup the internet from the laptop. Neither of which was accepable or useful&#8230;..</p>
<p>2. My sweetie and my friends kept me sufficiently busy to make a quick wardrive impossible. When I wrote my note last night I was at a friends house for a BBQ, was a tad drunk and was being yelled at by my other sweetie, (our hostess), for working on the computer when I only see her once a year&#8230;&#8230;</p>
<p>So&#8230;. To Part II</p>
<p>Title: A Tale of Two Log Files (Part II)<br />
Subtitle: How Proper Procedure and Comprehensive Logging make an Administrators job easier.</p>
<p>This is a story. It&#8217;s fictional and not necessarily factually/technically correct in all cases but I am using it to demonstrate two things that are very important to an administrator in the event of a compromise, the procedure and the logs. Both go hand in hand in the event of a compromise and both must be in place prior to the event itself. The proper planning prior to the event will speed up the investigation and save time and therefore money in the &#8220;clean-up&#8221; and mitigation of the breach. It&#8217;s a lot to do with the mindset and approach whether you are prepared or not and that is what I will try to show during the story.</p>
<p>Throughout the story you will find numbers in []. They point to the notes at the end of the story. The notes are meant to show what the participants did right or wrong, what should have been done prior to the event or what could have been done better.</p>
<p>This one was written with no technical reference available&#8230;. on a plane&#8230;.. just ignore the inaccuracies&#8230;..</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Following his procedure Gary had carefully carried out the remote portion of his investigation of Mike Panoff&#8217;s computer and was somewhat surprised to see that everything was as it should be. He called network administration and requested a new computer imaged for Mike Panoff&#8217;s department be brought to Mike&#8217;s office, picked up his forensic CD carrying his &#8220;toolkit&#8221; and made his way to Mike&#8217;s office.</p>
<p>&#8220;What&#8217;s up then Gary&#8221;, Mike said as he entered.<br />
&#8220;Ahhh&#8230; Not much&#8230; There&#8217;s nothing wrong with your computer from my point of view but I noticed the CPU fan seems to be failing. I&#8217;ve ordered you a new box and it&#8217;ll be here in the hour. I&#8217;m doing the netadmins a favor and running the diagnostics for them&#8221;<br />
&#8220;But what was it that made you look at it in the first place?&#8221;<br />
&#8220;Oh, that&#8230;.&#8221; Gary laughed, &#8220;Dumbass here misread a log file and transposed a couple of numbers. Those logs turn you cross-eyed after the first ten minutes&#8221; [8]</p>
<p>Gary and Mike carried on chatting as Gary mapped a network drive and began running through his repertoire of tricks sending the output away to the newly mapped drive. He didn&#8217;t have to look to his procedure book to determine what he should be doing next which may have raised Mike&#8217;s suspicion&#8217;s because he had built the CD from the procedure manual and had practiced with it. He had batch files written for the more complex switch requirements of some tools so that he wouldn&#8217;t have to remember the commands or refer to a manual for just this situation. All he needed to know was that he needed to run every tool on the CD, with the batch file if it was available and the location to send the resulting data. [9]</p>
<p>An hour and fourty seven minutes after leaving, Dirk was again parking his car in TFCU&#8217;s parking lot. His spirits were up from the initial low of the day and he had promised himself to have a &#8220;cold one&#8221; for Fyodor next time he had the chance. The NMap scans he ran against his sixteen IP public subnet had shown that there was no direct exposure to the public network. Small victory, but a victory all the same. He dropped into the CEO&#8217;s office on the way back to his own.</p>
<p>&#8220;Well, I have some news&#8230;. It wasn&#8217;t directly from the outside. I can&#8217;t find a way in from the outside&#8221;<br />
&#8220;Er&#8230; But that&#8217;s not good news then. Doesn&#8217;t that mean that &#8220;Al&#8221; is an employee?&#8221;<br />
&#8220;It could, but that is yet to be seen&#8221;<br />
&#8220;I&#8217;m not sure I understand&#8230;. If it isn&#8217;t from outside then it must be from inside. Who&#8217;s computer did the email come from?&#8221;<br />
&#8220;I don&#8217;t know right now, I haven&#8217;t checked. But I&#8217;m telling you that right now we don&#8217;t want to be accusing anyone of anything&#8221;.<br />
&#8220;I&#8217;d like to know who owns that computer&#8230;. and I&#8217;d like to know pretty soon&#8221;.<br />
&#8220;Mike, listen to me. There are a lot of ways that someone within the network messed up a machine without knowing it and now someone outside controls their computer.&#8221; [10]<br />
&#8220;You just told me that there was no access from the outside, so that&#8217;s not possible&#8221;<br />
&#8220;Mike, it is&#8230;. It&#8217;s like&#8230;. er&#8230; ET calling home&#8230;. I don&#8217;t remember the proper term but I read about it a few months ago. It&#8217;s a way around the firewalls&#8221; [11]<br />
&#8220;So you are saying that even though no-one can get in from outside, the firewall we payed that contractor almost $3000 for a few years back is useless?&#8221;<br />
&#8220;No, no&#8230; not at all. I have to let some traffic flow freely from the inside to the out or you won&#8217;t get your email, other staff won&#8217;t be able to use the web etc. etc.. So if Al got a program inside here that calls home through the&#8230; um, web interface that I have to have open then there isn&#8217;t a damned thing I can do to stop it.&#8221; [12]</p>
<p>Gary leant back in his chair as he addressed the meeting. The entire team was assembled and he had outlined the initial evidence that indicated a compromise had taken place.</p>
<p>&#8220;I just completed the data collection from a user&#8217;s computer that may have been used to steal the data. The computer has been switched off and removed from the user&#8217;s office and he has been given a replacement. I took a quick look at the data I collected and there is one thing that jumps out at me that seems a little odd but I need to get the drive imaged and secured before I can look deeper into that.&#8221;<br />
&#8220;Can you be more clear&#8221; said Bill Steel, the legal representative on the team, &#8220;I mean do we have a suspect or are there other possibilities&#8221;<br />
&#8220;Well, at this point I&#8217;m not going to point a finger anywhere. The odd thing on that box is a scheduled backup for 6:00pm nightly. It&#8217;s odd because by policy all user data is forced up to the file servers to keep it safe so there is no reason to run backups on the client workstations. However, until I can access a copy of the drive I can&#8217;t determine what is really there and why.</p>
<p>The meeting continued as the parties moved, step by step, through the series of questions they need to have answers to so that they can determine the course of action the company was going to take in this instance. The sticking point was &#8220;Al&#8221;. Having not had subsequent contact with him the team had no way of knowing what he was going to request. Clearly it was money but to a banking institution the amount would be of great interest. The meeting adjourned with no initial recommendation which would be postponed until after &#8220;Al&#8221; had made his demands clear. This bothered Gary somewhat in that until the recommendations were formulated and accepted by the board he had to treat everything as if it would have to be presented in a court of law and this would slow him down. He&#8217;d made that point at the meeting to ensure everyone was aware. [13]</p>
<p>Dirk sat staring blankly at his monitor. &#8220;Oh dear&#8230;. Why did it have to be her box, why couldn&#8217;t it have been that moron in Sales? I wouldn&#8217;t mind chasing him down and getting his ass nailed&#8221; he thought. After leaving Mike&#8217;s office he had decided to start by looking at the computer that sent the email last night. Having checked his records the IP and DNS name of the machine indicated it was Amy&#8217;s computer. [14] His mind gyrated as he tried to determine how to approach her and what to do when he got there when suddenly he thought, &#8220;Hah, it can&#8217;t be Amy&#8230;.. Yes!&#8230;. She has no access the the database&#8230;.. perfect&#8230;and I can prove it&#8230;. The server&#8217;s log files will prove that.&#8221; He scoured the log files for the previous week searching for anything that would point to Amy accessing the server. He was disappointed until he saw the time of the access, 10:27pm six days ago. There wasn&#8217;t a successful login but there had been two attempts. &#8220;Two tries&#8221; he thought, &#8220;Someone didn&#8217;t want to trip the automatic lockout. It couldn&#8217;t have been her, she would have used her password&#8221;. Poking around a little more he came to the transaction logs for that date. Scrolling down through the endless text he noticed some odd entries. &#8220;What on earth is that?&#8221; he thought, &#8220;Never seen entries like that&#8230;&#8221;</p>
<p>SELECT username FROM users WHERE MID$(username, 3) = &#8220;m&#8221; AND 1 = 1;</p>
<p>There were lots of them, rotating the numbers and the letters in the &#8220;where&#8221; statement. After looking at the entries for a while he thought he could see what was going on. &#8220;Someone is doing something to the administrator name in the user tables&#8221;, he thought, &#8220;But what&#8217;s the &#8216;AND 1=1&#8242; all about?&#8221; He was familiar with basic SQL queries but his practical knowledge was limited. Looking further down through the log he could see where the queries that extracted account information from the customer tables. &#8220;Well, for right now I can see where the leak took place but where the queries originated from is anyone&#8217;s guess. I&#8217;ll make backups of these logs and then see if I can find where the queries came from.&#8221; he thought. [15]</p>
<p>Gary moved across to his Secured Logging Systems analysis console while the image of Mike Panoff&#8217;s drive was being completed, documented and secured. &#8220;No point in sitting on my hands&#8221;, he thought, &#8220;If I&#8217;m lucky the internal IDS logs might show something of interest on Mike&#8217;s box&#8221;. He filtered the output to show only alerts from the internal sensors and started looking through the logs. While it isn&#8217;t unusual for workstations to trigger portscan alerts one caught Gary&#8217;s eye.</p>
<p>Portscan from 192.168.70.153 Ended: Time: 12 seconds, Hosts: 18, TCP: 18, UDP: 0</p>
<p>&#8220;What&#8217;s the Cincinnatti office doing kicking off a portscan? It must have only just exceeded the threshold&#8221;, he thought as he opened the portscan log itself. &#8220;The time is right and if Mike&#8217;s box is one of the target boxes then things may be coming together&#8221;. He looked down to the appropriate time and date and found the offending IP address. There it was, Mike&#8217;s IP address had been scanned from Cincinnatti about 30 minutes before the login to the server took place. &#8220;Something isn&#8217;t right&#8230; &#8221; he thought, &#8220;the scan is against port 80, Mike&#8217;s box didn&#8217;t have 80 open. I&#8217;m going to need that image to follow this track. First let&#8217;s see who our new &#8220;potential perp from Cincy&#8217; might be, maybe we have ourselves a winner.&#8221; he thought reaching for the phone. His hand didn&#8217;t get to it before it rang. He picked it up expecting to hear that the techs were done with the drive imaging procedure and that he could get it back.</p>
<p>&#8220;Hello, Gary speaking&#8221;<br />
&#8220;Tell your board that the price is ten thousand dollars. I&#8217;m not a greedy lad and ten grand isn&#8217;t much to your bosses, they could probably each pay it from their own pockets and not miss it&#8221;.</p>
<p>Gary grabbed for a pencil after the initial shock of hearing &#8220;Al&#8217;s&#8221; voice again. He needed to get the converstion down verbatim if he could but he already knew that he wouldn&#8217;t be able to do that. &#8220;What I can scribble down is what they are going to have to get&#8221; he thought as he checked his watch and noted down the time.</p>
<p>&#8220;Ten grand is a nice chunk of change, I dunno what they are going to say about that&#8221; Gary replied<br />
&#8220;Bullshit, and you know it. The information I have here is worth way more than ten grand&#8230;. Tell them to be smart&#8230;. and keep your eye on your email&#8221;&#8230;</p>
<p>The click of the phone found Gary still writing frantically to try to document the converstion precisely. He&#8217;d done a pretty good job, &#8220;a word here a word there&#8221; he thought as he finished up and reached for the phone again. &#8220;We need another IRT meeting, and fast&#8221; he thought as he began dialing familiar numbers</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
The Notes:-</p>
<p>[8] Here&#8217;s Gary lying again, but it&#8217;s all in a good cause. He&#8217;s come up with a story for why the box needs replacement and why it came to his attention in the first place. They don&#8217;t have to even be good stories for most users because they trust that you know what you are doing. Admitting to making a mistake goes a long way to having people believe you. It doesn&#8217;t matter that you didn&#8217;t make a mistake, the user is likely to empathize and accept your story more readily.</p>
<p>[9] This is one of the great benefits of being prepared. Gary doesn&#8217;t have to concentrate so hard on what he is doing to the exclusion of all else. His tools are all there, organized, easy to use and they follow the policy laid down. If the policy requires that certain tools be run in a certain order place them in folders on the CD called &#8220;1st&#8221;, &#8220;2nd&#8221; etc. The more you can do beforehand to make your task easy in the real event then the less stressed and more effective you will be. A further side benefit is demonstrated in the story, Gary can go about his difficult task while making it seem easy, stress free and routine without raising people&#8217;s suspicions. Furthermore, he can complete any documentation of the tools run and in what order from the time/date stamps on the files he is creating.</p>
<p>[10] Kudos again to Dirk. His boss is hell bent on finding a culprit quickly. He&#8217;s made a decision, based on a lack of information, and he now wants action. Dirk has, quite rightly, pointed out that there are alternatives that are equally probable and that rash action should not be taken. He also didn&#8217;t accuse anyone of doing something maliciously, he used the term &#8220;messed up&#8221; that implys an accident rather than using a more purjorative term such as &#8220;downloaded something&#8221; which implies a more deliberate act. This helps to keep the stress level of the major stakeholder&#8217;s down a little and can keep them from interfering in the wrong way.</p>
<p>[11] You don&#8217;t have to be a cracker to be effective in security. But you do need to keep up with what a cracker can and can&#8217;t do. You don&#8217;t even need to remember the details, just that it can be done. Without that knowledge it would have been easy for Dirk to also conclude that this is an inside job. Keeping up with the knowledge means you don&#8217;t have to discover things for yourself. It also allows you to be creative in your thinking, as a cracker would, in the ways these weaknesses can be exploited.</p>
<p>[12] Dirk thought about how he would phrase technical details so as not to complicate the issue with jargon unless it is absolutely necessary, (which is usually only at the conclusion of an investigation). This just isn&#8217;t the time to be throwing around port numbers and protocol names to stressed executives that have no idea what you are talking about. The odds are they will ask for clarification which costs you more time and there is a high probability that they will inadvertently misrepresent what you said to others thus confusing the issue and starting the rumor mill turning.</p>
<p>[13] Gary is on top of things as usual. It is critically important that the IRT understand that the investigation must proceed from the beginning at a &#8220;litigeous&#8221; pace, meaning that the technicians are expected to do everything as if it will be presented in a court of law. This is much slower than moving at an &#8220;investigative&#8221; pace which lacks much of the documentation and evidence preservation required by a court of law. It is also of critical importance to ensure that the board understands that when you will move from the higher requirement to the lower the evidence will be tainted. It must be stressed and understood by both the IRT and the board of directors that the two methodologies are exclusive and once the litigious methodology is departed from there is no going back with any hope of a successful prosecution.</p>
<p>[14] Regardless of the fact that there are people you like, people you dislike, people you trust and people you don&#8217;t there is one single rule in an investigation that you must follow. You distrust and dislike them all equally, it&#8217;s as simple as that. If you don&#8217;t you will allow preconceptions to cloud the process and possibly, unwittingly, allow them to move you away from the &#8220;truth&#8221;.</p>
<p>[15] Dirk&#8217;s lack of preparation and knowledge is beginning to show through. He&#8217;s &#8220;playing&#8221; with a log file that may contain evidence but he isn&#8217;t documenting it and he didn&#8217;t make copies before he looked at them. If Mike choses to try to prosecute the perpetrator in the future the chances are high that he will never get the case to court. Now he&#8217;s found his evidence he is making the appropriate copies, but this is too late. The copies should be made first, preferably to &#8220;write once&#8221; media such as CD-R if a litigious course is to be taken and then they should be searched and manipulated from the read only copy of the backup.</p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->

]]></content:encoded>
			<wfw:commentRss>http://www.thetazzone.com/tutorial-a-tale-of-two-logfiles-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
