Monday, December 12, 2011

How to limit or control bandwidth usage by users in a small local area network

How do we block or limit the bandwidth utilisation of a single or handful of users who exploit the network by saturating the bandwidth with P2P traffic?

How can we do this using a PC and a redly available software tools in a shared home network environment with out raising any alarms, with out using elaborate QOS service policies, proxy servers, or Cisco Switches/Routers?

I googled a bit and none of the solutions mentioned in various sites didn’t address my particular need.
As I was able to see from various forums I have browsed, this is an issue many people come across in daily life and till date I have not seen a definite simple solution.

To this question what people normally suggest is listed below:
  1. Use of a  Cisco or a Linksys router/ switch that has built in Quality of Service (QOS) features.
  2. Modify existing home router with hacked Linux firmware that enables QOS.
  3. Use of a proxy server or a specially designed bandwidth controlling software running on a gateway.
And the list goes on…

Yes, it is nice if you have a router that can do all that but in a SOHO environment it might not be the way to go. And after some time offending users may adjust their usage to coexist with other and spending money on hardware or software solution, which only get used for few days/weeks, might not be the best way to go about.

None of these solutions are cost effective, easy to implement/use and some may require the modification to the client machines or to the gateway router so that they redirect packets to the server which implements QOS feature instead to their default gateway. This cannot be done stealthily with out the help or consent of the user and I don’t think any one would give their consent to limit their bandwidth anyway.

So here is a simple yet effective solution to address just that. It limit the bandwidth utilisation at the network layer without alarming anyone , is simple, easy to configure and ethically very unsounding. Anyway what does these days?

These are the softwares you will need:

1. Cain & Able
2. Net limiter (Free version)

STEP 1 - Installing and configuring the software

First install both of these softwares in to a PC/Virtual machine that can act as a router. Cain & Able is considered by many antivirus software as an malware/hack tool. So you may need to create an exception for it in your antivirus software.

Secondly you will have to disable Windows or any other firewall in use or add exceptions to it to so that
Cain & Able can do it's job properly.

Optionally you can go to Configuration-> APR (ARP poison Routing) tab and set  spoofing options. This will makes it harder for the victim to trace your activities on the network.


STEP 2 - Running Cain & Able and Poisoning the ARP cache in the offending machine

This needs to be done so that our machine acts as a router sitting in between the offending machine and the gateway router. Yes, for those who are curious, technically this is a “Man in the middle attack”. But this is the easiest way to get the offensive traffic flow through our desired PC with out much hassel.

I will not try to explain this step in detail in here. please watch the movie below that explains it well.

Once you activate the ARP poisoning on the target machine , it will show up similar to the image shown above. As you can see this machine has hundreds of incoming and outgoing connections. This is a classic sign of running a P2P software.


STEP 3 - Run Netlimiter and limit the bandwidth as you find appropriate.

Once the offending machine is ARP poisoned, then you can open Netlimiter and check traffic routing through the interface by expanding Thrugoing nod. usng the bandwidth limiting capability in the Netlimiter , we can assign upload/download limits to individual machines or if you are lazy , you can cap  everything by setting limits to the Thrugoing nod.

Cain & Able is designed to deploy man in the middle attacks to collect and crack passwords from remote machines. In here we have put it in to  good cause .

As part of this configuration Cain & Able will collect many sensitive information flowing through it including plain text or encrypted  passwords …. So be ethical. With great powers comes great responsibility.

Sunday, September 25, 2011

Fix For: Mac OS X print button not responding.

Error Message:
None.

Screens:

Mac OS X Print button
 not responding

Platforms:
Mac OS X 10.6.x

Scenario:
This occurred after an Apple software update for Xerox printer drivers. After applying the software update when the user select the File->Print option, the print dialog appears. After selecting print options when the user clicks on the "Print" button nothing happens. Print Dialog box does not disappear as it usually does. User can exit the Print dialog box by pressing "Cancel" button.

Reason:
Corrupted or invalid Xerox printer driver or plugin came through Apple software updates might have caused this.

Solution:
  1.  Remove the printer that caused the issue using System Preferences -> Print & Fax
  2.  Remove/Move to Trash the Xerox printer drivers/plugins from the machine (path: /Library/Printers/FujiXerox) that might have been updated through the Apple software update routine. It is a good idea to keep a backup of files you delete in case you want to restore them back. In my case I removed everything in the FujiXerox folder.
  3. Empty the Trash folder to completely delete the files you have moved to Trash. You may need to restart the computer in order to do this as some files may be in use and will not let you delete them.
  4. Reinstall old Xerox printer drivers that used to work earlier.
  5. Add the printer back using System Preferences -> Print & Fax


/Library/Printers/FujiXerox Folder

Related Information:

Friday, July 8, 2011

Fix For: Unable to add the domain - An Unexpected Error of type - 14090 (eDSAuthFailed) occurred

Error Message:
Unable to add the domain - An Unexpected Error of type - 14090 (eDSAuthFailed) occurred.

Screens:



Platforms:
Mac OS X 10.6.x 
Mac OS X 10.5.x  

Scenario: 
Active Directory account credentials were not recognized by the machine. Directory users were unable to log in to the machine using their network log in credentials. Local OS X accounts works fine. trying to unbind the machine from the Active Directory may fail and require us to do a force unbind.  Then, when we go and try to rebind the machines to the directory , above mentioned message will appear.

Reason:
File "Kerberos:EXAMPLE.COM.AU.plist" located in /var/db/dslocal/nodes/Default/config/ may be corrupted or invalid. 

Sample content of the file /var/db/dslocal/nodes/Default/config/Kerberos:EXAMPLE.COM.AU.plist is shown below

Use the Terminal command:
sudo cat  /var/db/dslocal/nodes/Default/config/Kerberos:EXAMPLE.COM.AU.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>OSBuild</key>
<string>9L31a</string>
<key>appDurations</key>
<dict>
<key>["com.Adobe.ESD.AdobeUpdaterApplication"] [6.2.0.1474] [Adobe Updater 6.2.0.1474]</key>
<integer>81839</integer>
<key>[Microsoft/com.microsoft.AlertsDaemon] [12.2.5] [12.2.5]</key>
<integer>87438</integer>
<key>[Microsoft/com.microsoft.AlertsDaemon] [12.2.6] [12.2.6]</key>
<integer>158664</integer>
<key>[Microsoft/com.microsoft.AlertsDaemon] [12.2.7] [12.2.7]</key>
<integer>37661</integer>
<key>[com.adobe.Acrobat.Pro] [9.0.0] [9.0.0]</key>
<integer>137839</integer>
<key>[com.adobe.Installers.Setup] [2.1.51.0] [COMPUTER_NAME:nodes] 

Solution: 
Remove the Kerberos:EXAMPLE.COM.AU.plist file and attempt to bind the machine to the domain again.

Use the terminal command:
sudo rm /var/db/dslocal/nodes/Default/config/Kerberos:EXAMPLE.COM.AU.plist

More Information:

Thursday, May 26, 2011

Resetting the System Management Controller (SMC) And Parameter Random Access Memory (PRAM) in MacBook Pro

Problem:
MacBook Pro does not charge its internal battery. Laptop works till it is connected to the main power supply. But as soon as we take out the power code laptop dies as no power is left in the battery.

Screens:
In the following screen you can see that the internal battery is not getting charged even though the unit is connected to the mains supply.


Platform:
Hardware: MacBook Pro 8,1 i7/4GB RAM /500GB HDD
Software:  Mac OS X 10.6.7

Reason:
Corrupted System Management Controller (SMC) and/or  Parameter Random Access Memory  (PRAM) is responsible for this.

Solution:
Reset System Management Controller to factory defaults. 
Note: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).
  • Shut down the computer.
  • Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
  • On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
  • Release all the keys and the power button at the same time.
  • Press the power button to turn on the computer.  
Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.

Reset PRAM and NVRAM
  • Shut down the computer.
  • Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously.
  • Turn on the computer.
  • Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
  • Hold the keys down until the computer restarts and you hear the startup sound for the second time.
  • Release the keys.
Apple knowledge base Links:

Friday, March 25, 2011

Fix For : A virtual CPU has entered the shutdown state. This would have caused a physical machine to restart.

Error Message:

"A virtual CPU has entered the shutdown state. This would have caused a physical machine to restart. This can be caused by an incorrect configuration of the virtual machine, a bug in the operating system or a problem in the VMware Fusion software.

Screens:


Platforms:
Host:  Mac OS X 10.6.7
Guest: Mac OS X server 10.6.2
Hardware: Mac Book Pro, 2.3 GHz Intel Core i5 CPU
Software: VMware Fusion 3.1.2

Scenario: 
Was trying to install Mac OS X Snow leopard server as a VMware virtual guest on a new (Released Feb 2011) Mac Book pro. This resulted in above mentioned error. 

Reason:
The universal Mac OS X Server 10.6.2 / 10.6.3 (build 10d573) operating system does not work inside a virtual machine on the physical MacBook Pro models with Core i5/ i7 processors. These physical machines were released after Mac OS X Server 10.6.2 / 10.6.3 (build 10d573) was released, and they have a processor that Mac OS X Server 10.6.2 / 10.6.3 (build 10d573) does not support.

Solution: 
If you start with a 10.6.4 or greater version installation media, it should work.

There is a workaround as newfoundglory suggest.
Install Snow Leopard Server 10.6.3 inside VMware Fusion on an old Intel core 2 duo based machine. Then update it by running apple software updates to bring it to the latest version. Then copy over the virtual machine file to Mac Pro with i5/i7 CPU and try booting it.

More Information: