Tuesday, July 28, 2009

Streaming Video Using VLC

Edit:

There is a new solution. Simply go to adobe labs and install the new Flash Plugins 10.1 instead of 10.0.
The new plugin promises to offload video processing to the GPU reducing the CPU load.
Please remember to uninstall the old plugin before installing the new plugin.

If you installed it correctly and ran GPU-Z while watching youtube you should see this.


Here is a alternative solution for people having problems streaming youtube.
As you know youtube uses CPU to render the video hence if your CPU is not powerful enough you may experience playback issues (eg. Aspire Timeline with SU2700 Processor).
All laptop comes with good enough Graphics Processor to handle flash videos actually however to make use of the GPU to render flash you need VLC to convert the flash to utilise Video Codecs so the GPU can decode it here is a step by step guide.

Firstly download and install VLC

Next set VLC to DirectX so GPU will be utilised by VLC for playback


Next Launch VLC and select "Open Network Stream"


Enter the URL Containing the Video

Select Play and you are done!

To prove that CPU utilisation is lower using VLC playback:



Note the CPU utilisation averages at about 30-40%

While using VLC (Note: using GPU rendering forces the computer to turn off Aero Glass)

CPU utilisation averages between 10-20%.
The initial CPU spike is due to launching VLC and Setting it to URL Stream Mode.

However I have yet to figure out how to change the URL to High Quality Mode.
Suggestion anybody?

Edit: I found out how just append &fmt=22 to the end of the URL

Friday, July 24, 2009

How to protect your computer from malware infested thumbdrive

I have seen virus infected thumbdrives especially on computers that is poorly administrated (i.e. Users given administrative privilege) and especially when the users have no clue of the dangers of internet and downloads suspicious files with executable extensions.
Combine this with not-so-frequently updated anti-virus software it is a foregone conclusion malware infection will occur.

This will lead to frequent system crashes and poor Windows Experience and end of the day people usually point fingers at Microsoft etc and not themselves as the cause of malware infection.

As the system gets laden with more and more viruses system crashes and lag occur as the malware attempts to make unauthorised connection to the internet depending on what it was originally designed for.
Most virus do not attempt to disable the computer for obvious reasons.
They want to stay undetected so they can steal data from the infected host or simply use the host as part of a bot network, however things get ugly when more different viruses comes into play.

A virus will compete with other programs including other Virus for system resources if the computer do not have sufficient resource to feed them lag occurs if other viruses attempt to interfere with system files hijacked by other viruses a clash will resulting in system crash and Blue Screen Of Death.

Malware spread via a number of medium Internet as well as Removable Drives.
As the topic is fairly big I shall only focus on how to prevent Virus on thumbdrive from entering your host system.

First of all when I insert a thumbdrive a good anti-virus will attempt to scan it, if the Virus signature match it database it wil immediately isolate the file to prevent it from running as shown below.

The good news is even if you don't have anti-virus you can prevent them from running and see if the thumbdrive is infected .

Lets take a look at the infected thumbdrive.
Go to Folder Options and make the following changes to enable you to see all the files present on a thumbdrive.
Select "Show Hidden Files and Folders"
Uncheck "Hide Extension For Known File Types"
Uncheck "Hide Protected System Files and Folders"
If you have a Linux/BSD/Solaris System Partition you can boot in it and attempt to take a look into your Windows Partition, all the System Files in the C:\ will show up (including both important Windows System Files and Malware).


Malware usually obscure themselves as system files so you will not be able to spot them if you do not set the setting shown above.
Take note REAL system files will also reveal themselves so DO NOT delete files if you are not sure they are Windows System Files or not.
Deleting Windows System Files can cause System to be UNBOOTABLE.

Soon you can see other virus showing up.( Note:SPENSER.EXE is no longer on the drive as the Anti-Virus removed it)


A strangely named file can be seen above probably another virus which attempted to copy itself to the thumbdrive but SPENSER.EXE beat it to hijacking of the autorun.inf so it doesn't do anything.

As I have said Viruses hijack system files for them to perform misdeeds on thumbdrive they usually hijack autorun.inf.
Note: autorun.inf is originally a system file to enable users to autolaunch installation programs upon insertion of removable drive.

Lets take a look at the infected thumbdrive's autorun.inf (Right Click Open with Notepad).

If you remembered earlier the system anti-virus detected SPENSER.EXE
Look at how SPENSER.EXE hijacked the autorun.inf in order to auto launch itself upon insertion of the thumbdrive.

So how can you prevent this?
It is simple. Simply disable autorun in Xp or autoplay in Vista.
If autoplay/autorun is disabled the system will ignore the autorun.inf hence preventing the virus from runnning effectively and if you remember Virus hide themselves as System Files so you will never launch it accidentally.
However this is only for generic virus.
Some Virus are powerpoint or word macros programmed so disable Macro in Office Software will do the trick.

Friday, July 10, 2009

Windows and Firewalls

I find many people like to download third party firewall because they heard Windows Firewall isn't secure enough.
I do agree it is partially true, Windows Firewall isn't exactly the most secure firewall, however I do agree that Windows Firewall is sufficiently good enough for home users not to download a third party firewall.

So what is a firewall?


Basically a Firewall is just a Network Packet handler, nothing fanciful like the name you call it.
It doesn't look like this:
What it does is when it receives a network packet, it determines the course of action based on the firewall ruleset and the contents of the network packet.
How good a firewall depends on how well it is configured to handle different TCP/IP Packets(how good is the ruleset defined).
For Linux based system the Firewall is called IPTABLES.
See my point? A good firewall has NO Fanciful name or Graphics Interface. (*BSD uses a variety; IPFW or PF(Packet Filter))
IPTABLES is fundamentally configured via Commandline (aka Terminal) although a GUI called FireStarter exist for it to make configuring it easier.

Why is IPTABLES good?


Because it is configured via Commandline, the rules you can set is very versatile and flexible hence in the hands of a capable System Admin it can be difficult to find loopholes in the ruleset.
Therefore Linux Machines with Well Configure IPTABLES ruleset makes a very solid, secure Server.

What about Windows Firewall?


The reason I said it isn't as good as the ruleset available in Windows XP is very limited you can't configure it much.
For Windows Vista it is slightly better as it allows ruleset customization. However in the hands of a average computer user not well verse in firewalling rules, it achieves very little.
For deploying a Windows System as a Server this is not enough.
However for home users this is actually sufficient.
How many home user actually get hacked by a cracker? Very very little.
Most users get pwned by Malware (as a result of downloading and executing suspicious files) more often than a net penetration.
Why is this so?

Why is Windows Firewall "Good Enough" for Home Users?

Because home users connect via an ISP and they don't stay connected 24/7.
Think of it as a mobile home. The attacker has to do reconnaissance, vulnerability scanning however home users do not stay connected that long to an IP for an attacker to do that.
To invade a system you need planning even if it is as weakly defended like a straw hut you need to find the door first.
If the hut changes location frequently how are you even going to find it?

Addition protection you did not notice:

To add on most ISP uses NAT (Network Address Translation) meaning the packet redirection is done at a ISP level hence the attack do not know the real IP address to your System.
NAT behaves as a form of firewall.
Modern homes also uses a router than implements NAT at router level further masking your real location.
You may ask if it is redirected so many times how do the server know it is this particular system that is requesting this information.
The answer is stateful packet inspection.
Each time your computer initiate an outgoing connection, the router will keep track of the connection.
If it is closed and a foreign server request an incoming connection that is not expected it is dropped hence no external connection could be made to your computer by a external server unless you allow a direct connection which would be then your fault.

Another thing you may argue is good firewall prevent malware from initiating unwanted external connection from the inside, much like a spy, but then again it is the user fault from downloading the malware besides when a malware infects your system you should remove it and not let it continue to make external connection from your system.

Norton will tell you your computer needs it and of course Mcafee will also scare you into buying their products but the truth is you are more secure than they are trying to make you believe.
Not to mention third party firewall consume system resource, run extra threads causes weird System behavior and incompatibilities hence going against my software principal of "less is more".

I hope you will learnt from this that firewall while essential for server is not so essential for home users considering so much NAT is already in place so head over to uninstall unnecessary firewall programs now.

Tuesday, July 7, 2009

Upgrading Driver from 186.03 to 186.24

I just updated the Nvidia Drivers for my 9100M G from Nvidia Released 186.03 to Nvidia Beta 186.24.
Here are the new Windows Experience Index Scores

Nvidia Released Drivers 186.03

Nvidia Beta Drivers 186.24

Also I felt the display was better looking, brighter more vibrant (well can't really benchmark, this could be my eyes too).
Anyway I recommend this driver for Nvidia Users.

Monday, July 6, 2009

Optimize Windows Vista Boot

What you should do to conserve and optimize disk space and boot time.

1) After download software like Firefox, after installation please delete the installer.

eg. Setup.exe

New Versions will come out and internet download speeds are so fast, so there is no point keeping it.

2) Do this weekly:
Start>> All Programs>> Accesories>> System Tools>> Disk Clean Up

Check Everything Except for Hibernation File.

Or download and install a autodiskcleanup script I created

CCleaner is a extra ware that does the same thing it uses System Resource hence I don't use this.

3) Open Control Panel >> Administrative Tools >> Services
Disable "SuperFetch"
Stop "Superfetch"
Reason being Superfetch isn't very efficient, very often it overfetches Programs you rarely use, increasing boot time as a result.

4) Clean temporary Directories.
They are:
C:\Users\{Your User Name}\AppData\Local\Temp
C:\Windows\Temp
C:\Windows\Prefetch (Delete the ReadyBoot Contents before ReadyBoot folder)
I have created a batch file to kill superfetch.
Download and run with Administrator permission here (Superfetch Killer)
5) Here is a Windows Batch File that clears useless file recursively in all directories.
Batch file is provided by mydigitallife

Open in Notepad to see the script content.
To Run, Right Click "Run as Admin"

Next run sdelete to zero the harddisk space and return all unused space

Use the command:
sdelete -c
After that do a Disk Defragmentation and Reboot

Using this method my Acer Aspire 4530 now boots in 5 Rolling Bars instead of the previous 18 &
My 5 year old Desktop has the following specification:
Intel Pentium 4 HT 2.8GHZ 512KB L2 Cache (NorthWood)
4GB DDR RAM 400MHZ
250GB WD 16MB Buffer Cache
875P Motherboard
Currently the dinosaur is running Windows Vista rather speedily so try it!


Wednesday, July 1, 2009

Changing the BackUp ShortCut Key on Acer Timeline

The follow is the Registry Entry for Acer Aspire Timeline.
I already modified this key to point to Windows Media Player.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Inventec\LManager\Settings\Buttons\Backup]
"Command"="wmplayer.exe"
"Command Type"="1"
"Label"="Windows Media Player"
"Remote Code"="C008"
"Description"=""Windows Media Player"
"Configable"="1"
"Show OSD Only for Legacy"="0"
If you want it to point to other programs, simply
  1. copy and paste onto notepad
  2. Change "wmplayer.exe" to something else the reason I don't use the full path is because wmplayer is in C:\Windows and the shortcut can automatically find anything in C:\Windows.
  3. If the program is in Program Files you have to use the full path eg."C:\Program Files\XXX\XXX.exe"
  4. Change the Label and description (although it doesn't work as in display the word Windows Media Player when you click it)
  5. Save as backup.reg
  6. Double Click then Confirm and you are done.