Showing posts with label Vista. Show all posts
Showing posts with label Vista. Show all posts

Monday, May 25, 2015

Revisiting the Toshiba Laptop Error: Workaround Attained!

It has been just over 1 month since I posted the GSD Crowd Source Troubleshooting Flare: Toshiba Laptop Error.

My uncle had been doing OK with his Vista loaded Toshiba Satellite A215-S4757. (Part No: PSAEGU-01100U.)

However he started getting the following BIOS error in booting:

System Configuration Data updated
ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
    Bus:1A, Device:04, Function:01
ERROR
Resource Conflict – PCI Mass Storage Controller in slot 01
    Bus:1A, Device:04, Function:02
ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
    Bus:1A, Device:04, Function:03

We could continue with the BIOS boot process and eventually get to the desktop Vista load.

That then reported a driver issue with the “Memory Module” driver and we were unsuccessful with getting one installed. My uncle reported there were also a few other device errors found in the Device Manager.

Miles Wolbe left a comment in the post that led to the solution. They key bit of his detailed research was this:

Check the Device Manager for what device is on (in your case) Bus 1A (26 in decimal).

Attila-Mihaly Balazs was close behind.

Just an observation: the error message talks about different PCI devices (serial bus and mass storage - this could the the SD/CF card reader), so I don't think it's a memory issue but rather an issue with those devices. Is the BIOS failing to detect them properly?

Upon finally being able to coordinate a remote-control session with my uncle, I checked the device manager to look at the details of what was showing an error…and what their bus # was (looking for “1A” or “26”).

Guess what we found?

Image-1

Image-2

Image-3

A more detailed look with SIV - System Information Viewer found some more details.

Image-4

Tech Tip: if you haven’t ever ran an SIV “Save all” export to TXT file(s) before it is an amazing thing to behold once done! Extreme system hardware documentation!

Basically every one of the bus number “26” items listed there report “Detected Parity Error”.

The PCI bus item involves the Cardbus Bridge (26-04-0), the OHCI FireWire (26-04-1), a Memory Controller (26-04-2), and a SMBus Controller (26-04-3) all sitting on it. That seems to involve the 5-in-1 “memory” card reader device.

Do those look familiar? They should!

ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
    Bus:1A, Device:04, Function:01
ERROR
Resource Conflict – PCI Mass Storage Controller in slot 01
    Bus:1A, Device:04, Function:02
ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
   Bus:1A, Device:04, Function:03

So I went in and set both these “error state” devices to “disabled” manually.

This didn’t stop the BIOS errors from still appearing, but did prevent the errors and device driver detection attempts when Windows Vista loaded.

My uncle was satisfied with this fix and figures he can keep it running for a while longer before deciding to do a repair or replace it with a new system.

My uncle had been doing a lot of photography and may have caused a crack or problem with the card-reader/connection to the mainboard to develop while heavily using the integrated card-reader.  He can live without it and works around the issue by using an external USB connector to flash memory card reader to still access his photos.

Here are some supplemental resources if/when a motherboard replacement may be decided upon:

That last link was very fascinating.  I didn’t spring for the schematic, but the picture provided shows the PCI card-bus. It seems very likely to me that this is the same TI IEEE 1394 Bus host controller we are having issues with.

Laptop-schematics.com also provides a free samples page where you can download a RAR file for many motherboards including Toshiba. I took a look at that sample one and while I am no electrical engineer, I can see how these documents would be very helpful for low-level hardware troubleshooting and problem isolation. Really cool stuff there!

So all is well and special thanks to Miles, The FF Guru, and Attila-Mihaly for contributing to the solution!

This was an excellent and nicely guided journey to see how BIOS errors can be translated into the Windows device manager (and more) with some friends, logic, and a few utilities.

Cheers!

--Claus V.

Saturday, April 11, 2015

GSD Crowd Source Troubleshooting Flare: Toshiba Laptop Error

HELP!

Over the past several weeks I’ve been assisting my uncle with troubleshooting a persistent issue on his laptop.

I’ve covered all the bases that I can think of so far and have arrived at the conclusion that we are facing a laptop system-board that has a failed or failing component. And that (for now) the failure appears to be non-critical.

Options I can think of for permanent repair would be system board replacement ($250 USD + labor) or upgrade to a new/used laptop platform.

But I’d really love to have some additional suggestions or thoughts from the faithful GSD readers to either correct my misdiagnosis and/or point us on the right track for additional troubleshooting.

The system is a Toshiba Satellite A215-S4757 laptop running Windows Vista.

Recently, my uncle reports that when booting, it presents the following error messages in the BIOS as it is coming up:

image

for the search robots

System Configuration Data updated
ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
    Bus:1A, Device:04, Function:01
ERROR
Resource Conflict – PCI Mass Storage Controller in slot 01
    Bus:1A, Device:04, Function:02
ERROR
Resource Conflict – PCI Serial Bus Controller in slot 01
    Bus:1A, Device:04, Function:03

A search on the web found more than a few instances of similar issues by Toshiba laptop users but no clear solution:

The BIOS boot process can be resumed and eventually walked though to the desktop Vista loading.

Upon getting Windows loaded, Windows reports a driver issue with the “Memory Module” driver and is unsuccessful with getting one installed. My uncle reports there are also a few other device errors found in the Device Manager view but I’ve not been able to do a remote session to get them noted specifically. I think one he mentioned is for a multi flash-card reader component of the laptop.

We’ve run several memory tests (Windows and via LiveCD) that come back clean. The system has two 2GB DIMMS to bring it to max load of 4 GB. They have been reseated to no effect.

I also had him boot a Linux LiveCD that still saw the same errors during the BIOS boot but otherwise then loaded and operated OK.

The BIOS was flashed to the latest version available on the Toshiba product support page mentioned. No issues were encountered during the BIOS upgrade flash but the errors seen by the BIOS load persist.  The BIOS itself is very simple and a review of the photos he provided of the BIOS options don’t find any advanced options to fiddle with IRQ or PCI settings like the BIOS of my home-brew Shuttle-SFF system has.The settings I observed seem to be stock and normal for such a system.

The system can be booted on past the errors and seems to run “fine” otherwise once Vista loads…except for the device/driver errors that appear to be (for now) non-critical/fatal to system operation.

My uncle also may be having some other startup/autoruns issues due to previous software install issues, but I don’t think that those are related to the BIOS issue. They need to be addressed but are of a secondary level concern IMHO.

I’m pending a remote control session so I can explore his Vista device drivers some more and then assess his system hardware with the following tools to collect more information:

Note: I generally don’t like grant blanket trust to driver-update helper software and prefer to find my driver downloads direct from source. However, these type of tools may be useful for doing system scans for information gathering purposes and to see the possible hardware/drivers that I need to evaluate and then decide to apply on my own. Caution: Here be dragons.

My thoughts:

Since the BIOS was flashed successfully, I don’t believe the issue is with the BIOS/firmware code.

Since the error happens during the BIOS boot load, I believe it is detecting a hardware failure with the system board components.

I’ve not found yet a Toshiba laptop mode diagnostic boot disk like those Dell offers for its systems. Is one out there to test the hardware via Toshiba OEM support tools?

Because we are seeing the core errors before the Vista OS loads, I don’t believe the Vista OS is the problem…and that the driver/device errors are a consequence of the core hardware issue seen at the BIOS boot.

Please let me know if you can recommend any additional troubleshooting or diagnostic tips I can try when we get going on our remote-connect session.

If this was at work I’d be putting in a ticket for a system-board replacement with out vendor.  However the cost of replacing the motherboard outright on a home-user’s system – and the age of the system – it may be cheaper to pick up a new laptop and move on. I’m thinking the price point is going to be very close. But then again, there may be something obvious I am overlooking.

Thoughts? Suggestions?

--Claus Valca

Monday, January 20, 2014

And now…back to regular GSD posting…

ForSec News

Most of these seem to be timely links in light of the recent malware-induced data breaches of late…

Patch Time Again!

Yesterday when flipping channels between a re-broadcast of Downton Abbey and the AFC playoff game (yeah--real contrast right?) Dad called in a panic as his dear wife had been browsing the InterTubes on their Vista system and they got an apparent Microsoft Security Essentials virus detection alert.

Only it didn’t quite look like what they were used to. So I popped on remotely and took a look.

Long story short, it was actually a fake AV alert image embedded in an IE tab page. Clever. Not.

Using ProcessExplorer I was able to confirm it was a “click here to clean” IE browser session only and not an actual malware fake AV binary causing the display. So a few targeted process kills later all was gone.

We did a trial to show again how the real MSSE client they have running on their system presents a legitimate detection alert.

This is a pretty common event now for them and their system. The vector seems to be that she opens up IE (the latest IE version offered for MS Vista is 9 which they have). Her home page is Yahoo.com. So then she just types in what she is looking for in the “handy” Yahoo search bar on that page and flows down the Internet River.  Often getting amazing numbers of multi-page ad/scam loads in new browser tab sessions. Yahoo seems to be the wild-west of this time of ad/page hijacking. Anyway…

We set up Google Chrome for her to use and depreciated IE as much as we could from the desktop/quick-launch in hopes that Chrome might provide a bit more protection. I ran out of time before having to head to the church-house for service support and didn’t get a chance to load it up with some additional ad-block protections but that is on the to-do list.

Anyway, before I bailed I also brought up their Java (needed unfortunately), Flash, Shockwave, Air versions to current status.

Fingers cross this will hold the dam back a bit more until little brother and I can convince Dad it is time for an OS upgrade to Win7/8 from Vista.

So with that background in mind…go get your patches!

XP support under Microsoft Security Essentials Extended (kinda)

Microsoft has come out with clarification that their Microsoft Security Essentials product will no longer be offered for download to XP OS system users after April 2014. However MS will continue to offer DAT file downloads/updates for already installed MSSE clients on XP though April 2015.

Small consolation, but really, other than looking for AV support of XP from other security software vendors, it really is time to upgrade to Windows 7 (or Win 8 I suppose).

Sysadmin Links

Defrag Tools over at Channel 9 has posted “Part 3” of their Message Analyzer video set:

TRAINING: “Windows Performance Jump Start” – Jan 23rd, Online - Kurt Shintaku's Blog

Bitrot and atomic COWs: Inside “next-gen” filesystems - Ars Technica

How to nuke your encrypted Kali install - Kali Linux

New Utilities of Note

PCI-Z - freeware - Detect unknown PCI devices. Spotted via this Identify unknown PC hardware with PCI-Z post over at BetaNews.

Recuva - freeware - version update to 1.50. - This file recovery software has some major feature updates added.

Piriform News - Recuva v1.50

Change log:

  • Added ISO 9660 file system support
  • Added recovery from unmounted drives
  • Improved duplicated file name recovery
  • Added Junction Point recovery support
  • Improved optical drive detection and recovery
  • Improved scan statistics accuracy

Bit more detail on what some of those features mean over at this Betanews post: Recuva now recovers data from unmounted drives, ISO-formatted optical discs

Cheers!

Claus V.

Sunday, June 26, 2011

Anti-Malware Tools of Note

As promised, here is a resource-dump of some anti-virus/anti-malware tools I either use for came across in my recently documented battles that I thought would be helpful for reference.

As with many things in life, having the right tool for the particular job at hand can save much time and aggravation.   Hopefully most of these will already be well known to the GSD faithful readers. But I also hope that maybe one or two of these may be new finds as well to go into your toolbox.

Obviously this isn’t a complete list.  However they nicely supplement those I’ve already recommended. Check the side-bar to the left for many more that have been previously shared here.

While I do sometimes favor a direct frontal attack against malware while the system is running “live”, I typically find it much more productive to first whack-away at the infected system “off-line” having booted the system first in a WinPE environment.  I prefer to use my own custom Sexy USB Boots tools on a write-protected USB stick.  There are lots of flavors of WinPE including WinFE and WinRE and each bring their own benefits/drawbacks to the fight.

One important lesson I’ve learned is that the more scratch-space you can spare on your WinPE build, the better your apps will run in the WinPE operating environment.  Check out this WinPE and DISM/PEimg to boost Scratch Space (Ram Disk) post to option things out.  If you want to carry the option to boot from several different “boot.wim” files with different scratch-space settings, or maybe WinPE, WinRE, and WinFE boot options all on the same stick check out this WinPE Multi-boot a Bootable USB Storage device post for some thoughts.

Of course there are lots of different options for building your WinPE as well.  You can go “old-school” and use the Microsoft WAIK, there is WinBuilder, or you can check out TinyApps cool find to build a WinPE without any of those extra bits.  AgniPulse sets out a great tool and method to in his Beginners Guide to Creating Custom Windows PE.

My own preferred first-strike team is to boot the system with WinPE then toss the free tool VIPRE Rescue at the system.  There are two things that I think really make this anti-malware tool exceptional.  First it is easy to use and very thorough. But secondly, it creates some incredible logs and quarantines the files.  Both the logs and quarantined files helps me understand what was going on with the infection and possibly what vector it used.  That might help me secure the fixed system and submit the files for additional analysis.

Once the system is running “live” again, I also like to toss Malwarebytes Anti-Malware Free at the system.  It is a pretty aggressive anti-malware scanner with lots of options.

I also like SurfRight’s Hitman Pro 3 and have found it seems to do an exceptional job addressing issues that are missed by many other tools I have used. The plus is that you can use their product to get unlimited free scanning + 30 day removal.

Norton Power Eraser is a very powerful tool to root-out deeply embedded malware from a system Read their page carefully first.  I’ve had good experience with it myself.

I also keep handy and request a third-scan opinion from the still fairly new Microsoft Safety Scanner.  Being a “standalone” tool of sorts, it can be run in the WinPE environment or on the “live” system.  The trick in WinPE is to make sure your WinPE build has a large scratch-space value.  Check out this 4sysops post Offline Antivirus – How to run Microsoft Safety Scanner on Windows PE 3.0 for more details.

I do understand that for some folks, the thought of making a custom-spun WinPE boot tool could be quite intimidating.  With that in mind, you will want to keep a copy of the Microsoft Standalone System Sweeper Beta handy.  Of course you will need an uninfected “host” system to create the tool. Download the “builder” utility in either x32 or x64 flavor depending on your hardware and choose a blank CD, DVD, or USB drive with at least 250 MB of space. Execute the tool and build-away.

Of course, you may want to do more with this plain-Jane WinPE build that it lets you.  And you can if you know the tricks our dear TinyApps bloggist posts in his Extending Microsoft Standalone System Sweeper tips.

Maybe all you want is just to download and burn an ISO file to CD and use it to try to disinfect a system without all those extra bells-and-whistles that I love so much in WinPE.

Well, many reputable security product vendors offer their own tools as well in that same line.

Calendar of Updates has a page that is kept pretty updated Free Anti-Virus Rescue boot CDs including direct links to Avira Rescue CD & BitDefender Rescue CD.

F-Secure keeps their own Rescue CD resource updated. They also offer some fantastic Easy Clean, Online Scanner, and Blacklight rootkit tool.

Likewise, Kaspersky has their own Rescue Disk 10 tool as well as an Online Scanner, an incredibilly extensive toolbox of free Virus-fighting utilities to address specialized malware threats, a tool to remove banner from desktop, unlock Windows.  Kaspersky also offers valuable documentation on common malware information, viruses and solutions, as well as Rogue security software response guidance.

Dr.Web CureIt!! is another LiveCD solution worth knowing.  See also their Sysadmin First aid kit page for some additional resources.

Not “free” for everyone but a good LiveCD resource for Norton product users, check out the Norton Bootable Recovery Tool.  As explained on the page, “You will need your product key or PIN in order to use the Norton Bootable Recovery Tool.”

Likewise, if you are a Sophos customer, they also offer their customers the Sophos Bootable Anti-Virus tool. However, they do offer some Free Tools as well, including some specialized tools as well as Free Security Scan tools and their Sophos Anti-Rootkit tool.

Need more? Check out this GSD USB based AV/AM Tools post for many more options.

I have an extensive collection of highly-specialized sysadmin tools at my disposal. However the following tools are always the ones I keep coming back to over and over again. All free.

As malware (and particularly scareware/rogue-security “products”) gets more and more sophisticated, it seems even more highly-specialized tools are needed to fight and restore the damage done by them.

Broken EXE Association is a how to and REG files for fixing issues launching applications after an infection.

The Updated Combofix (5-23-11) is a highly specialized tool offered by the fine folks at bleepingcomputer.com forums.  It is not recommended to run on your own without guidance from their community unless you are already an advanced/professional Windows system specialist. Seriously.  Read their ComboFix usage, Questions, Help? page well and carefully before embarking on its usage.

See also their RKill utility. From that page:

RKill is a program that was developed at BleepingComputer.com that attempts to terminate known malware processes so that your normal security software can then run and clean your computer of infections. When RKill runs it will kill malware processes and then import a Registry file that removes incorrect file associations and fixes policies that stop us from using certain tools. When finished it will display a log file that shows the processes that were terminated while the program was running.

As RKill only terminates a program's running process, and does not delete any files, after running it you should not reboot your computer as any malware processes that are configured to start automatically will just be started again. Instead, after running RKill you should immediately scan your computer using some sort of anti-malware or anti-virus program so that the infections can be properly remove

And for any Mac users/caretakers who are still reading this post, they also have a BleepingComputer Mac Rogue Remover Tool. Check out that page for more info.

This Google redirect virus forum thread has a lot of great tips and steps to follow in addressing malware in general.

As I last posted, I feel remiss to not re-mention this guide Remove Windows Recovery (Uninstall Guide) over at BleepingComputer.com for a good review and walkthrough of a semi-automated recovery process.

Included in there are two noteworthy tools: RKill (Download Link) and Unhide.exe (Download Link). Rkill is a rouge-process killer of sorts and unhide.exe attempts to restore malware-relocated user files back to their original/rightful locations. See this Bleeping Computer Downloads: RKill page for more information as well as this one Question on 'unhide.exe' for more background information on them both.

You can also take the manual restoration approach offered by “colsearle”

Try navigating to the following path: (make sure you have the hidden files and folders visible)
C:\Documents and Settings\your user name goes here \Local Settings\Temp\smtmp
Inside the smtmp folder you will see three folders named 1, 2, 4
1 = Start Menu Program shortcuts
2 = Current User Quick Start shortcuts
4 = All Users Desktop folders and shortcuts
Simply copy the shortcuts back to the original path.

I also found this guide over at SmartestComputing written by “Broni” to be very helpful as well and full of specialized remediation tools and links How to restore files hidden/deleted by Windows Recovery virus.

Although most of what I see now-a-days is Windows 7 and Vista systems for most of my home/family/friends systems. More than a few still have XP systems. One trick still in my bag from days ago is when a system is cleaned of a internet-browsing redirector infection the internet doesn’t work anymore is that in many cases it requires the network sockets to be “reset” by running a tool like LSP-Fix or WinSock XP Fix 1.2 (via MajorGeeks mirror site).  This only should be run on XP systems.

Coming full-circle again in this post, some of these tools and techniques require working on a live running system and others can be done “off-line” using a LiveCD/WinPE/otherOS approach.

If you do go with a “off-line” boot method such as WinPE from a bootable USB flash or HDD, you want to be very careful you avoid potential cross-infection in your response/rescue efforts. Yes a bootable CD/DVD does offer greater protection but at the same time, it can severely reduce the number of options or other tools you can bring to bear on assessing and cleansing the system.

If you have a LOT of bootable ISO files (as I do for specialized situations), then I seriously recommend the awesome iodd device for sysadmins and incident responders as well as you semi-pro malware busters.  It allows you to carry many, many, many different bootable ISO files on a portable HDD and pick between them on the fly for off-line system booting.  Couple that with a physical write-block switch and the ability to partition the hard disk drive you cram into it, and you can carry many portable apps on there as well to access if you are booting in, say, a WinPE environment.

If that seems like way too much (and it never could be) firepower, then at least consider a USB flash drive with a write-block switch.  My personal preference is the Kanguru Flashblu II (NewEgg product link).  It is a great value for a reasonably sized USB drive with a write-block switch.  Sony also offers write-block switches on some of their USB flash drives (Alvis has one in fact) but they are getting harder and harder to find.

If you don’t have the option or resources to pick up either one, but do have a bootable USB flash drive that you have already loaded up with all your scanners, tools, and other response files, consider this simple and free tool usbdummyprotect. The trick to using it is to download the tool and unzip, then copy it directly onto your USB drive.  There, run it.  It creates a “dummy” file to fill up all the remaining free-space on your flash-drive.  In theory, this should prevent malware from copying any files to your drive.  When you want your free-space back, just delete the clearly identified dummy file.

Not quite the same thing, but noteworthy is Document Solutions free DSi USB Write-Blocker. You need to download and install this on your own clean-system first. Then run the tool BEFORE connecting a USB flash device.  Basically it keeps your own running system from writing TO the USB device once you plug the device onto your PC.  This should preserve time/date stamps and other file modifications.  It doesn’t necessarily protect your host system from anything bad on the device itself if you choose to either run anything directly or copy off the device and run locally. So understand how it works first then use it when the situation calls.

Finally, in some cases, the malware might have actually damaged or modified the Windows bootloader itself. If this is the case and any of the specialized tools already mentioned didn’t work to restore the Windows boot loader, then you may need to do it yourself.

See this GSD post Partition and Disk Management: Part II – Free and Useful Tools for a rich roundup of resources.

For a really nice and trusted freeware GUI tool check out EasyBCD 2.1 from NeoSmart Technologies.

I also recently discovered MBRWizard which is not a free product (but it is offered dirt-cheap) and has a great GUI as well.  However, for your value-expecting fans not afraid of a little command-line ninja work, they do offer a CLI Freeware version! Check out the Command line reference page for more information.

Effectively responding to a malware/rogue-ware infection is never an easy task. It takes careful assessment, planning, research, tool/utility/scanner gathering, off-line booting in many cases, and lots and lots of tedious, patience-requiring work.  It takes time, experience, and for the non-technical, lots and lots of help from a devoted community.

Obviously, this post can’t even really begin to scratch the surface of the tools and techniques out there. However, I hope it is a good starting point or comes to be a return-to resource source to collect valuable materials as you go forth and battle.

Cheers.

--Claus V.

Saturday, June 25, 2011

Skirmish 2: A Rouge Security Software battle

Fresh off of having wrestled my friend’s system back from the clutches of a rogue-security product, a few weeks later Dad called in a panic with his Windows Vista system in cardiac arrest.

He had booted his system only to find all their documents, emails, and family photos missing.

On top of that, they had a “security scanner” warning them their system was “infected” in many critical locations and only their product could remove the mess and possibly restore their files.

Oh bother. Not again.

I knew that with this kind of mess, attempting to clean the system remotely would be counter-productive.

Dad offered to drive down and pass the base-unit off to me.

Looks like the workbench was going to stay dust-free.

Basically, I followed the same steps previously outlined in the GSD post Skirmish 1: A Rouge Security Software battle.

However I had to tread just a bit more carefully in the assessment process.

Dad’s system did support direct USB flash-based booting.  So I could use one of my custom WinPE USB boot sticks for just a bit faster off-line booting performance.

I quickly determined (much to his relief) that all the user profiles, documents, emails, and photos were in fact present and accounted for.

Turns out this bad-nasty had done some additional mojo which “hid” all the start program files, as well as the user desktop (folder) environment as well.

The full list of infected baddies found:

  • Trojan:WinNT/Alureon.S
  • Exploit:Java/CVE-2009-3867.IJ
  • Exploit:Java/CVE-2008-5353.SN
  • Trojan:Java/Mugademel.A
  • TrojanDownloader:Java/OpenConnection.EM
  • Exploit:Java/CVE-2008-5353.QV

Again, another drive-by browsing infection caused by outdated Java version. Nice…

Because I first carefully assessed the system, in Dad’s system’s case, I had elected to NOT run CCleaner or any other temp-file cleanup tools.  This ended up being a very good thing.

This particular infection had relocated all those critical system/program files and settings into a temp folder.  Had I run the cleanup blindly, I would have ended up nuking all the original files and had to manually rebuild the entire Start/Program list, as well as the desktop items.

The public face of this infection ended up being a variant of “Windows Recovery” malware/rouge-security scareware.

This guide Remove Windows Recovery (Uninstall Guide) over at BleepingComputer.com has a good review and walkthrough of a semi-automated recovery process.

Included in there are two noteworthy tools: RKill (Download Link) and Unhide.exe (Download Link). Rkill is a rouge-process killer of sorts and unhide.exe attempts to restore malware-relocated user files back to their original/rightful locations. See this Bleeping Computer Downloads: RKill page for more information as well as this one Question on 'unhide.exe' for more background information on them both.

I preferred to take the manual restoration approach offered by “colsearle”

Try navigating to the following path: (make sure you have the hidden files and folders visible)
C:\Documents and Settings\your user name goes here \Local Settings\Temp\smtmp
Inside the smtmp folder you will see three folders named 1, 2, 4
1 = Start Menu Program shortcuts
2 = Current User Quick Start shortcuts
4 = All Users Desktop folders and shortcuts
Simply copy the shortcuts back to the original path.

I also found this guide over at SmartestComputing written by “Broni” to be very helpful as well and full of specialized remediation tools and links How to restore files hidden/deleted by Windows Recovery virus.

Once all was running/cleaned as expected, I had to re-arm the Windows Firewall (disabled), re-arm the automatic updates (disabled), re-arm the anti-virus application (realtime protection disabled).

Again, all Browser Plugin Updates were applied. I updated all the web-browsers, Quicktime, Adobe Reader, etc.  Removed some toolbars, stuff like that.

Dad returned a week later and after a super-yummy lunch at a local authentic tex-mex dive, the system got handed back and once reconnected at its home, Dad found it to be perfectly restored.

Now if we can’t just push him onto Windows 7….

--Claus V.

Saturday, July 17, 2010

Windows zero-day exploit?: USB storage + .lnk files + file explorer = FAIL

Update 07-17-2010 – 6:45 PM (CST) I’ve added a couple more late-breaking details added to the bottom of the post

The best summary brief on the issue I’ve seen comes from F-Secure Weblog: Espionage Attack Uses LNK Shortcut Files. Quoting…

There's a possible new zero day in the wild which is being used in targeted espionage attacks. Belorussian antivirus company, VirusBlokAda, recently published news about two new rootkit samples, and quite interestingly, the infection vector is a USB storage device and Windows shortcut [.LNK] files.

The rootkit uses a LNK file that infects the operating system when viewed by an icon rendering file explorer such as Windows Explorer or Total Commander.

According to Krebs on Security, the method is capable of infecting a fully patched Windows 7 computer.

From Krebs: Jerry Bryant, of Microsoft, stated that "Microsoft is investigating new public claims of malware propagating via USB storage devices. When we have completed our investigations we will take appropriate action to protect users and the Internet ecosystem."

Our initial analysis of the samples appears to indicate that the shortcuts somehow take advantage of the way in which Windows handles Control Panel shortcut files.

Got the gist?

According to Microsoft, it appears all versions of Windows from XP through Windows 7 are vulnerable to this attack method.  Oh bother!

OK, more reading now:

Finally initial deep analysis for the hard-core set:

The current thinking is that an expired but still valid Realtek Semiconductor Corp driver signing certificate is being used to load/install the root-kit malware files “mrxnet.sys” and “mrxcls.sys”. 

Microsoft also reported they have worked with VeriSign and Realtek and now have had the particular driver-signing certificate used in this initial attack revoked.

From the Microsoft Malware Protection Center Post:

Threat details

What is unique about Stuxnet is that it utilizes a new method of propagation. Specifically, it takes advantage of specially-crafted shortcut files (also known as .lnk files) placed on USB drives to automatically execute malware as soon as the .lnk file is read by the operating system. In other words, simply browsing to the removable media drive using an application that displays shortcut icons (like Windows Explorer) runs the malware without any additional user interaction. We anticipate other malware authors taking advantage of this technique. Stuxnet will infect any usb drive that is attached to the system, and for this reason we’ve classified the malware as a worm.  This classification for the malware should not be confused with another vector used by this worm, the newly disclosed vulnerability (CVE-2010-2568) covered in today’s advisory.  The vulnerability itself is not wormable.

Stuxnet uses the aforementioned .lnk technique to install additional malware components.  It first injects a backdoor (Worm:Win32/Stuxnet.A) onto the compromised system, and then drops two drivers:

  • Trojan:WinNT/Stuxnet.A - hides the presence of the .lnk files
  • Trojan:WinNT/Stuxnet.B - injects (formerly) encrypted data blobs (.tmp files) into memory, each of which appear to serve different purposes as the Stuxnet deployment system infrastructure (drivers, .lnk files, propagation, etc.).

These drivers are signed with a digital certificate belonging to a well-known hardware manufacturer called Realtek Semiconductor Corp., which is unusual because it would imply that the malware authors somehow had access to Realtek’s private key.  Microsoft MMPC has been working with Verisign to revoke this certificate, and did so at 08:05:42 PM UTC with the agreement and support of Realtek.

Also the fact that currently some evidence exists that Siemens WinCC SCADA systems seem to be the target could be based on the fact they seem to require use of a standard id/password set to correctly operate.  However that is sure to change as other attackers build upon the now disclosed vulnerability.

A workaround (temporary fix) offered by Microsoft in the Microsoft Security Advisory (2286198) is to disable the display of icons for shortcuts as follows:

1. Click Start, click Run, type Regedit in the Open box, and then click OK

2. Locate and then click the following registry key:
HKEY_CLASSES_ROOT\lnkfile\shellex\IconHandler

3. Click the File menu and select Export

4.In the Export Registry File dialog box, enter LNK_Icon_Backup.reg and click Save
Note This will create a backup of this registry key in the My Documents folder by default

5.Select the value (Default) on the right hand window in the Registy Editor. Press Enter to edit the value of the key. Remove the value, so that the value is blank, and press Enter.

6. Restart explorer.exe or restart the computer.

Impact of workaround.Disabling icons from being displayed for shortcuts prevents the issue from being exploited on affected systems. When this workaround is implemented, shortcut files and Internet Explorer shortcuts will no longer have an icon displayed.

It seems that most all GUI-based Windows file explorer tools, including those not from Microsoft, could trip the vulnerability when used to view an infected USB storage device. One such text-based Windows file explorer tool that does not is reported to be Far Manager so you probably would do well to keep a version of this one on your systems when doing examinations of USB devices.

Of course, it might be even better to use a lab-system, and one running a LiveCD distro of a Linux-based OS to do your suspect USB storage device examinations….just saying…

Finally, incident responders might also be well to know that Windows Incident Response bloggest Harlan Carvey has also weighed in on this, as well as the issues it illustrates for responders:

Whew!

This is still a breaking event so I’m sure more information will be coming in the days ahead as everyone devotes more resources to research and analysis (and hopefully Microsoft with a vulnerability patch…unless it turns to be a “feature”).

Update 07-17-2010 – 6:45 PM (CST)

The H Security team in their Trojan spreads via new Windows hole post adds this observation:

Microsoft has been informed about the vulnerability, but appears to have problems with reproducing it. Andreas Marx of AV-Test says that every .lnk file is linked to the ID of the newly infected USB Flash drive. This means that the sample trojans found so far can't simply be started on an arbitrary Windows system – the malware will only start in the OllyDbg debugger after some modifications to the code.

And the SANS-ISC Storm Center Handler’s Diary has this post Vulnerability in Windows "LNK" files? with findings from the handler’s work on malcode they got their hands on.  Quoting from Bojan’s update to the article notice,

I've tested the exploit and can confirm that it works in Windows XP, Vista and Windows 7. The exploit uses a specially crafted LNK file. This file allows the attacker to execute an arbitrary file by carefully specifying its location – the LNK file in itself does not exploit any vulnerability such as buffer overflows, for example, so it is a legitimate LNK file. The LNK file used in targeted attacks was manually crafted as some fields that are normally present, such as CreationTime, AccessTime or WriteTime are all set to 0.

I will not be posting details about how the exploit works, but here are some things that you should be aware of:

  • If autorun is disabled, when a USB device with malicious LNK files is inserted, the exploit will not be triggered automatically.
  • The exploit is triggered every time a folder containing a malicious LNK files is opened (for example, with Windows Explorer). It does not matter where this folder is – it does not have to be on a USB device, but in order to execute to malicious binary, the attacker has to specify its location correctly.

What makes this vulnerability extremely serious is the fact that it can be opened from any place, including remote shares, for example. The victim just has to browse to the remote share in order to trigger the vulnerability. So double check permissions on any remote shares you use in your companies (you shouldn't allow users to write in root folders, for example).

Seems like it’s a security-focused posting weekend here at GSD!

Cheers!

--Claus V.

Sunday, January 03, 2010

Windows Things…

image 

cc attribution: "4 Windows" on Flickr by gmahender

Odds-n-ends for Windows things.

The Windows 7 ISO Image Edition Switcher is a set of small binary patches (and a tool to apply these patches) that will convert an official Windows 7 ISO disc image into an official Windows 7 ISO disc image of another edition. The resulting ISO images are bit-for-bit identical with those posted on MSDN or TechNet, and their SHA-1 hashes should match the official hashes posted by Microsoft.

The ei.cfg Removal Utility is a simple tool that will remove the ei.cfg from any Windows 7 ISO disc image, thereby converting the image into a "universal disc" that will prompt the user to select an edition during setup. This tool works by toggling the deletion bit in the UDF file table, eliminating the need for unpacking and rebuilding the ISO, which means that this is extremely fast (the process of patching the ISO to remove ei.cfg takes only a fraction of a second), and the process is easily reversible (running the utility on a disc image patched by this utility will restore the disc image to its original state).

Please note that these won’t allow your Windows Home Premium key to suddenly activate a Windows Ultimate install that you converted your install disk to offer…  Right key for right product version is still required….

Similar to previous external beta service pack rollouts, Microsoft has enabled – via updates you already installed – a beta ‘candidacy check’ within its Windows Update software. Just like Windows Vista, a registry key and value pair need to be added prior to being authorized to download the new software.

Lots of coolness here.  Just be careful how you apply the power!

--Claus V.

Saturday, January 02, 2010

Opening Ports in Windows Firewall from Batch files

All of our systems run a single application/service that is auto-(re)-installed from a user login event script.

No biggie.  It’s kinda overkill but it is a critical application that could be deleted accidently.

It does require that we add some Windows Firewall port exceptions for custom IP addresses so it can have a clear shot through the Windows Firewall if the user accidentally or purposefully (say our laptop users) enable the firewall.

All of my own built system images for some time have had the custom port opening rules added in by default.

However, some older systems didn’t deploy with my image and didn’t have the port configured by default.  Since we are not an AD shop, it has meant going, upon request, to the users’ systems, verifying the application/service is running correctly, and then manually going into the Windows Firewall GUI to set the open port rule and custom scope.

Usually it’s not a big deal but sometimes it can be as it is disruptive to an end-user when we drop in and start suddenly adding Firewall port rules/exceptions to the system from the GUI.  Some end users are fairly PC savvy and it can generate some raised eyebrows and questions that add more time to the service job.

Recently I had completed another such assignment and wondered if I could just skip all the drama of having someone watch me set custom Windows Firewall port rules.  Maybe I could just make a silent-running and innocuous batch file that could quietly do all the work for me in the background while I focused on checking other system things.

Sure enough…I could…and it’s pretty easy as well.

GUI-based Windows Firewall Port Exceptions

Some applications and services need to be able to get out through the firewall.  Sometime “mothership” applications need to signal down to the client-side application/service.  Firewalls work to prevent those communications.

However if the communications inbound/outbound are legitimate and mission-critical, you need to open up a hole to talk-through.

Normally opening a hole in your security wall is dangerous as maybe someone unwanted could sneak in.  Windows uses communication “holes” called ports.  Actually I guess they are more like “channels” or frequencies rather than ports (windows) on the side of a ship.  Certain programs and services only talk on certain ports/channels.  Generally the firewall locks these down so the call can’t go through.  However, these can be opened up so that anyone/anything could talk on that port.

Sites like GRC | ShieldsUP! or McAfee’s Test Your Firewall, or SecurityMetrics Free Port Scan or PC Flanks can be used for free to test your system for open ports.

But what if you don’t want’ to leave a port open to everyone, even though you need to?  You can then set one more level of protection on your port by setting a custom rule to only allow traffic of a certain type and/or trusted IP address (or range) to flow through.

Firewalls are great but they can interfere with applications, games, and other communications from trusted programs that by design need to reach the network/Internet. 

Luckily Windows XP and higher does allow you to set these kind of special exceptions.  For most folks using the GUI method is simple enough and easy to do.

Unlike an exception, which is only open during the time that it is needed, a port stays open all the time, so be sure to close ports that you don't need anymore.

  1. Open Windows Firewall by clicking the Start button, clicking Control Panel, clicking Security, and then clicking Windows Firewall.

  2. Click Allow a program through Windows Firewall.  If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  3. Click Add port.

  4. In the Name box, type a name that will help you remember what the port is used for.

  5. In the Port number box, type the port number.

  6. Click TCP or UDP, depending on the protocol.

  7. To change scope for the port, click Change scope, and then click the option that you want to use. ("Scope" refers to the set of computers that can use this port opening.)

Which works just fine but takes a while to click through, enter the correct values (assuming you still remember them), and isn’t very discreet, particularly if the rule name sounds suspicious.

But a silent-running batch-file now that would be quick, surgical, and endoscopic.

I did find that Gammadyne’s Free DOS Utilities offers a free command-line tool FIREWALL.EXE for adding exceptions to the Windows Firewall but it wasn’t quite as granular as I was looking for.

Luckily, Windows XP (and a more advanced one in Vista/Windows 7) does contain just the command-line tool I needed.

NETSH to the CLI Firewall configuring rescue!

It didn’t take me too much effort to find the NETSH command and the wonderful tricks it could do:

These were great and gave me the basics that I needed to see my goal was possible to accomplish.

Then I found Penn State U’s fantastic page How To Add Programs and Ports to Windows XP SP2 Firewall Exceptions List. Not only did it have some basics, but it also has a unpackable collection of batch-files tailor-made for configuring Windows Firewall rules with these techniques; including both prompted and silent-running batch files with netsh commands.  It provides some great examples to use as starting points.

In the end, the heart of my own custom Windows XP Firewall batch file will contain a line like this:

netsh firewall add portopening TCP <my target port #> OPRule_<port#> ENABLE ALL CUSTOM <ip address #1,ip address #2>

where <my target port #"> is the specific one that our application/service communicates through, and where <ip address #1,ip address #2> are the specific IP addresses used the the “mothership” application that only will be allowed to solicit requests to the local client application through that specific port.

NETSH CLI References

The links above were great but they didn’t really help me understand and add the details like “ALL” which set the Windows Firewall port exception rule for all profiles on the system. Nor did it help me with the “CUSTOM” argument to detail which IP’s I needed to open up when setting the rule.  While the examples found showed how to open up a port number, it didn’t deal with setting the port to use the specific IP ranges that I wanted to only allow.

For those details I had to turn to these wonderful resources.

In my case specifically this portion (though the Appendix is rich with Netsh CLI goodness) is what I was interested in.

add portopening

Used to create a port-based exception.

Syntax:

Note Some parts of the following code snippet have been displayed in multiple lines only for better readability. These should be entered in a single line.

add portopening
[ protocol = ] TCP|UDP|ALL    
[ port = ] 1-65535    
[ name = ] name    
[ [ mode = ] ENABLE|DISABLE       
    [ scope = ] ALL|SUBNET|CUSTOM      
    [ addresses = ] addresses      
    [ profile = ] CURRENT|DOMAIN|STANDARD|ALL      
    [ interface = ] name ] 
Adds firewall port configuration. 
Parameters: 
protocol - Port protocol.    
    TCP  - Transmission Control Protocol (TCP).    
    UDP  - User Datagram Protocol (UDP).    
    ALL  - All protocols. 
port - Port number. 
name - Port name. 
mode - Port mode (optional).    
    ENABLE  - Allow through firewall (default).    
    DISABLE - Do not allow through firewall. 
scope - Port scope (optional).    
    ALL    - Allow all traffic through firewall (default).    
    SUBNET - Allow only local network (subnet) traffic through firewall.
    CUSTOM - Allow only specified traffic through firewall. 
addresses - Custom scope addresses (optional). 
profile   - Configuration profile (optional).    
    CURRENT  - Current profile (default).    
    DOMAIN   - Domain profile.    
    STANDARD - Standard profile.    
    ALL      - All profiles. 
interface - Interface name (optional). 
Remarks: 'profile' and 'interface' may not be specified together. 'scope' and 'interface' may not be specified together. 'scope' must be 'CUSTOM' to specify 'addresses'. 
Examples:    
     add portopening TCP 80 MyWebPort    
     add portopening UDP 500 IKE ENABLE ALL    
     add portopening ALL 53 DNS ENABLE CUSTOM 157.60.0.1,172.16.0.0/16,10.0.0.0/255. 0.0.0,LocalSubnet    
     add portopening protocol = TCP port = 80 name = MyWebPort    
     add portopening protocol = UDP port = 500 name = IKE mode = ENABLE scope = ALL    
     add portopening protocol = ALL port = 53 name = DNS mode = ENABLE scope = CUSTOM addresses = 157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

You can also use “netsh set portopening” to modify an existing port rule or “netsh delete portopening” to remove one from a batch-file or command line.

NETSH in Vista/Windows 7

Netsh is still present in Vista/Windows 7 but advances in the Windows Firewall design have demanded it be expanded to keep with the times.

In XP, you have to call the “netsh firewall” context when placing your add or set or delete portopening commands and arguments (along with all the other firewall-specific supported netsh commands). 

In Vista and Windows 7 that changes to now require "netsh advfirewall firewall" context to control Windows Firewall behavior.

  • How to use the "netsh advfirewall firewall" context instead of the "netsh firewall" context to control Windows Firewall behavior in Windows Server 2008 and in Windows Vista – Microsoft Help and Support Article ID: 947709.

    The netsh advfirewall firewall command-line context is available in Windows Server 2008 and in Windows Vista. This context provides the functionality for controlling Windows Firewall behavior that was provided by the netsh firewall context in earlier Windows operating systems.

    This context also provides functionality for more precise control of firewall rules. These rules include the following per-profile settings:

    Domain

    Private

    Public

      The netsh firewall command-line context might be deprecated in a future version of the Windows operating system. We recommend that you use the netsh advfirewall firewall context to control firewall behavior.

      Note The netsh firewall command line is not recommended for use in Windows Vista.

    And then there is this…

    • Netsh Commands for Windows Firewall with Advanced Security – Microsoft TechNet.

      Applies To: Windows 7,Windows Server 2008,Windows Server 2008 R2,Windows Vista

      Netsh advfirewall is a command-line tool for Windows Firewall with Advanced Security that helps with the creation, administration, and monitoring of Windows Firewall and IPsec settings and provides an alternative to console-based management. This can be useful in the following situations:

      When deploying Windows Firewall with Advanced Security settings to computers on a wide area network (WAN), commands can be used interactively at the Netsh command prompt to provide better performance than gnraphical utilities when used across slow-speed network links.

      When deploying Windows Firewall with Advanced Security settings to a large number of computers, commands can be used in batch mode at the Netsh command prompt to help script and automate recurring administrative tasks that must be performed.

      You must have the required permissions to run the netsh advfirewall commands:

      If you are a member of the Administrators group, and User Account Control is enabled on your computer, then run the commands from a command prompt with elevated permissions. To start a command prompt with elevated permissions, find the icon or Start menu entry that you use to start a command prompt session, right-click it, and then click Run as administrator.

    From there (at least in my specific need) you then need to move on to either the

    or the

    Good stuff all the way round.

    Can’t wait to start deploying…

    Claus V.

    Sunday, December 13, 2009

    Free Windows GREP tools – I’m Excited!

    Back in August ‘09, Keydet89 posed the following question in his Windows Incident Response blog post “Goin’ commando”…

    Anyway, I think that is would be a great place to start throwing up information, discussion and links to free and open-source tools that folks are using for analyzing various files or formats. This can include general stuff (such as, does anyone have a good, free grep utility for Windows that doesn't use cygwin?)

    Harlan then followed that post with a roundup of new free tools and utilities.  He had also previously shared a  number of freely offered blog posts on, well, free utilities that might benefit both the Windows forensic examiner (and sysadmins as well).

    Anyway…I think his was a rhetorical question regarding the Windows grep utility, but I responded in the comments about my own personal freeware grep favorite…

    • BareGrep - Free grep for Windows – Bare Metal Software.  Great tool for advanced and complex system and file searching for only 246 kB in size but very fast and very advanced for the most demanding system-inspecting needs.  Simply amazing.  Oh yes. It’s a single non-installing exe file and fully portable. Works great on XP through Windows 7 systems.  I’ve used it with great success to narrow my analysis on a few incident response assignments.  It really saved the day.

    Since then I have found and collected a few more freeware grep tools. Most are GUI-based but a few are command-line.  Take your pick.

    • File Hound 3.08 - (freeware) – JimmyTheFork.com.  An updated version of his “Hound” grep tool.  I spotted it mentioned over in this DonationCoder thread Hound: a grep-alike that searches inside PDFs.  For a sample of the GUI see this Hound screenshot link.  Fully portable, download, unzip and run the exe.  I particularly like the fact that it is more intuitive to use and identify the result locations than the uber-powerful BareGrep utility.
    • Windows Grep - (freeware) – brilliant app which ran great “portably” on my Windows 7 system.  The GUI interface is very pleasant and modern (in a no-frills way).  What stood out the strongest to me was the interactive “wizard” that runs first. It nicely guides n00bies through the basic steps of setting up a search pattern, a location, and other parameters before kicking off the search.  Don’t be fooled. It’s got some advanced searching power for the experts to tap as well. The results are wonderfully displayed in an index format and the preview pane below highlights all the findings for very fast analysis.  Good job Huw Millington! Most excellent tool.
    • PRGrep - (freeware) – Another surprisingly well crafted GUI-based grep tool for Windows. Again, it seems to be portable.  Not quite as user-friendly for the uninitiated, anyone who does grep work will pick its functions up quickly.  Searching was fast and like Windows Grep, the display hits are nicely detailed and highlighted in the lower pane.  It can plug into MS Office for Word/Excel file reading.  I particularly liked the “old-school” format which makes copy/paste activity a breeze. PRGrep documentation is outstanding.
    • GREP for Windows - A very flexible grep for windows – (freeware) - opbarns.com O. Patrick Barns did an 2006 update to Tim Charron’s "GREP for Windows" port. He cleaned up some bugs in that version as seem to relate to subdirectory searching with the "-S” argument.  Yep.  CLI only with this one, baby.
    • Grep for Windows and GREP for Windows both of which seem to be the original CLI ports by Tim Charron of the GNU grep 2.0 allowing for sub-directory searching.  Examples of syntax provided on the pages.
    • GREP Command for Windows XP - Windows XP and DOS – Malektips.com – Tips to use of QGREP command.  Note: it does require extraction from Windows 2003 Resource Kit.  Syntax and expression usage documented there wonderfully as well.  More info on the Win2003RK here.  I’m guessing that if it works on XP, it should do OK on Vista and Windows 7 as well.

    Curious News on Future Windows Resource Kits

    Note that according to information and references in this Resource Kit – Wikipedia article…

    In 2007 and 2008 respectively, Microsoft released the Windows Vista and Windows Server 2008 Resource Kits. Microsoft has also released resource kits for Group Policy, Windows security, Active Directory, Terminal Services and IIS 7. The Windows Vista Resource Kit ships with several sample VBScripts and few PowerShell scripts.

    The Windows 7 Resource Kit was released on 14 September 2009 [3]. Microsoft has announced that new unsupported resource kit tools will not be provided for current and future operating systems [4], however the PowerShell team has released a Resource Kit PowerShell Pack [5], a collection of PowerShell modules that adds over 700 scripts to those already present in Windows 7.

    References

    [3]  Windows 7 Resource Kit: Microsoft Press blog

    [4]  Are Resource Kits Dead? NOPE!

    [5]  Introducing the Windows 7 Resource Kit PowerShell Pack

    To be clear; the Resource Kits are alive and well, but it looks like the traditional “unsupported” tools and utilities that came with them, beloved by sysadmins world-wide, are now an endangered species.

    See how it works?

    Ask a question, get a slew of cool free utilities for the sysadmin and forensic pros alike!

    Cheers!

    --Claus V.