Thursday, October 7, 2010

How to Disable Terminal Server Licensing in Windows 2003/ 2008/ 2012

Your Terminal Server License is valid for 120 days......isn't it irritating.
Let's get rid of it.........
 
(1) Install Terminal Server Licensing in the Windows 2003 /2008 /2012 machine.
(2) Stop Terminal Server Licensing service.
(3) Find TLSLic.edb file in %Systemroot%/System32/LServer/  and rename it as  TLSLic_old.edb (or any name of your choice).
(4) Start Terminal Server Licensing service.
(5) Restart the machine.

You are done :)

Wednesday, August 11, 2010

How to Reset GRUB Password in Linux

Here are the steps of changing / rest grub password even after loading the OS

(1) # grub
 grub> passwd: **********
 grub> Encripted: $1$CxcdNVbcfsgUEFd0

Now copy the password-hash ie Encrypted value

(2) Edit grub.conf file and paste the password-hash

# vi /etc/grub.conf

passwd --md5 $1$CxcdNVbcfsgUEFd0

(3) Now save the file and restart the system.

How to Reset The Root Password in Linux

This blog post illustrates three methods to break the root/grub password

METHOD 1

HOW TO RESET UR ROOT PASSWORD IF U FORGET IT

While Booting ( Redhat ) just press "e" in GRUB

u will find 3 lines of code.

Goto to the 2nd line press "e" again and type "1" in the end

then press ENTER.

Then press "b" and it will boot you into your shell.

Just type "passwd" and change your ROOT password...

don't need to know the old one.


METHOD 2

"I, uh, forgot the root password"

Let's look at recovering the root password from the boot loader. If you're using GRUB, then, as GRUB loads up, highlight the Red Hat Linux entry on the GRUB menu and then press [E] to edit the boot configuration. Locate the following line, something that looks like this:

kernel /boot/vmlinuz-2.4.20-0.70 root=LABEL=/hdc=ide-scsi

Type the number '1' at the end. Doing so boots the PC into run level 1-single user mode, where you're automatically logged in as root. This done, type 'passwd' at the prompt. You can enter a new password here.


METHOD 3

To break the GRUB start-up password, follow the steps given below:

1. Boot the system with the first Linux CD. At the boot prompt, type linux rescue to switch to rescue mode. In rescue mode you will be asked if similar steps should be followed, which need to be followed in the installation. Once you get the # prompt, type the following command:

# chmod /mnt/sysImage

2. Edit the grub.conf file and remove the passwd line from the file. Save the file and exit.

3. Once your machine reboots, you will be able to start your Linux OS in the usual manner.

Tuesday, August 10, 2010

How To Install RHEL on SATA HDD

During the installation of Linux (RHEL) on a SATA HDD, it can give PCI Probing Error and/or disk error.

Two changes must be done before loading the RHEL on a SATA disk.

(1) In BIOS:

In advance option change SATA as IDE

(2) Insert CD-1 and type the following line on boot: prompt-

boot: linux pci=nommconf
or
boot: linux all-generic-ide noapic nolapic
or
boot: linux all-generic-ide
or
boot: linux nommconf all-generic-ide
or
boot: apm=off acpi=off

Now you can load RHEL-5 on your SATA HDD.

How To Install Printers in Linux / Ubuntu

Here is the procedure to install the printer with the Zenographics ZjStream wire protocol.

There are many printers that use the Zenographics engine. I have compiled a list below:


Printer Model                          foo2zjs Identifier

HP Color LaserJet 2600n                2600n

HP Color LaserJet 1600                 1600

Konica Minolta magicolor 2530DL 2530

Konica Minolta magicolor 2490MF 2490

Konica Minolta magicolor 2480MF 2480

Xerox Phaser 6115MFP                 6115

Konica Minolta magicolor 2430 DL 2430

Minolta/QMS magicolor 2300 DL   2300

Minolta/QMS magicolor 2200 DL   2200

Minolta Color PageWorks/Pro L     cpwl

Samsung CLP-300                          300

Samsung CLP-600                          600

Samsung CLX-2160                       2160

Samsung CLX-3160                       3160

* Okidata 3200n                             3200

* Okidata 3300n                             3300

* Okidata 3400n                             3400

* Okidata 5100n                             5100

* Okidata 5200n                             5200

* Okidata 5500n                             5500

* Okidata 5600n                             5600

* Okidata 5800n                             5800

Xerox Phaser 6110 and 6110MFP 6110

Lexmark C500                               500

HP LaserJet 1020                          1020

HP LaserJet 1018                          1018

HP LaserJet 1005                          1005

HP LaserJet 1000                          1000

HP Laserjet P1005                        P1005

HP Laserjet P1006                        P1006

HP Laserjet P1505                        P1505
-------------------------------------------------------------------------------

PROCEDURE (A):-

(1) Download driver

$ wget -0 foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

(2) Unpack it

$ tar zxf foo2zjs.tar.gz
$ cd foo2zjs

(3) Compile it

$ make

(4) Get extra file and firmware

$ ./getweb 1020    # for e.g.  HP 1020 Printer

(5) Install driver

$ sudo make install
or
# make install

(6) Configure hot-plugins (optional)

# make install-hotplug

(7) Restart Spooler

# make cups

(8) Now Add a printer

# printconf-gui
---------------------------------------------------------------------------------

PROCEDURE (B):-

Download the script to your home folder (Ubuntu Feisty/Edgy/Dapper).


wget http://www.stchman.com/tools/foo2zjs/ubuntu_foo2zjs_install.sh

Download the script to your home folder (Ubuntu Gutsy)

wget http://www.stchman.com/tools/foo2zjs/ubuntu_foo2zjs_install_gutsy_hardy.sh

Change the permission to the executable on the script (Ubuntu Feisty/Edgy/Dapper).

chmod 755 ~/ubuntu_foo2zjs_install.sh

Change the permission to the executable on the script (Ubuntu Gutsy and Hardy).

chmod 755 ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

Run the script with the proper foo2zjs Identifier.
It is imperative that you select the proper printer as the proper firmware needs to be loaded. Substitute with the proper number in column one from the chart above. If you have a Laserjet 1000 then substitute 1000 for. A number other than one from the chart will cause the script to terminate.
Ubuntu Feisty/Edgy/Dapper

sudo ~/ubuntu_foo2zjs_install.sh

Ubuntu Gutsy and Hardy

sudo ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

The script will launch the Gnome CUPS Manager for Feisty/Edgy/Dapper or System Printer Configuration tool in Gutsy. Select your printer and follow the on-screen selections.

Remove the script as it is no longer needed.
The script will take care of removing the archive and all associated temporary files.

Ubuntu Feisty/Edgy/Dapper

rm -f ~/ubuntu_foo2zjs_install.sh

Ubuntu Gutsy and Hardy

rm -f ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

Your Zenographics based printer should now function under Ubuntu as well as it does under Windows. Cycle power on the printer and reboot your computer.

Happy printing :)


Tuesday, August 3, 2010

Secure your system over the net

Make the following settings in your PC / Laptop for more secure net surfing. Here it is shown the screenshots of Windows XP. More or less it is the same for Windows 7 and Vista.

(1) Disable auto shares. Follow the link for more details;

How to disable auto shares

(2) Disable vulnerable ports. Follow the link for more detail;

How to disable TCP/UDP ports

(3) Disable Remote desktop

My Computer ->Properties ->Remote ->Remote Desktop then uncheck the checkbox.


(4) Do not log in as administrator while surfing the net.

How to install Java in Ubuntu /Linux

There are two methods to install JRE/JDK in Ubuntu
(1) Online:

#sudo apt-get install sun-java6-jre (for users)
#sudo apt-get install sun-java6-jdk (for developers)
#sudo apt-get install sun-java6-plugins (java plugins)
#sudo apt-get install sun-java6-fonts (java fonts)
Or you can run all commands together
#sudo apt-get install sun-java6-jre sun-java6-plugins sun-java6-jdk

(It will download JRE/JDK from Sun site and install in your system)

To check java version
#java -version

Or type in FireFox URL
about:plugins
It will display installed java plugins.

(2) Offline:

(a) Non -RPM package (bin)

(i) Download the JDK from Sun
(ii) Click on the "Download" link in the JDK 6 section.
(iii) Accept the license and continue.
(iv) Under the "Linux Platform", select "self-extracting file".
(v) Download this .bin file and save it to your GNU/Linux machine.
(vi) Once it has been downloaded, switch to the directory where you saved the file. You do not need to be a root and only must have the write access to the folder where you wish to install java. If your administrator is not supportive, you may need to place java into your home folder or even better on some shared network location.
(vii) Type sh name_of_the_downloaded_file, for instance sh jdk-6u2-linux-i586.bin. There is no need to make this file executable.
(viii) The license agreement should start to appear on the screen. Scroll to the end of it with 'Enter' and type yes.
(ix) This installer will create its installation in the same folder, where the downloaded file was placed and from where you have started the installation script. But the installed java jre is rather independent and can be easily moved into another place just by copying all its files.
(x) You can install multiple different jre's this way: they coexist together and can be used if some software requires the older version to run.
(xi) The java executable you need to launch is located in a subfolder, called 'bin'. This way of installation will not configure a default 'java' command for you: you must do this manually or always include the full path in your startup script.

(b) RPM package

(i) Download the JDK from Sun
(ii) Click on the "Download" link in the JDK 6 section.
(iii) Accept the license and continue.
(iv) Under the "Linux Platform", select "RPM in the self-extracting file".
(v) Download this .bin file and save it to your GNU/Linux machine.
(vi) Once it has been downloaded, login as root and switch to the directory where you saved the file.
(vii) Execute './filename', where filename is the name of the file that you downloaded. The filename might be very similar to jdk-6-linux-i586-rpm.bin depending on what the latest version is. You may have to make the file executable by executing the 'chmod +x filename.bin' command.
(viii) You will get a license, press space bar a bunch of times until you are prompted to enter yes or no. Type in yes and hit enter.
(ix) This will place a .rpm file in the same directory as your .bin file with the same name (minus the .bin part).(x) Install the rpm file by executing 'rpm -i filename.rpm', where filename is the name of your .rpm file. (Such as jdk-6-linux-i586.rpm).
(xi) Now, if you want to be able to execute this version of Java interpreter or compiler from any directory on your GNU/Linux system you will have to create a few symbolic links:

     ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
     ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac

(xii) You are done :)

Monday, August 2, 2010

Blocking Blacklisted Sites In Windows And Linux/ Ubuntu

In Windows:

In Windows sites are restricted through browser settings or the firewall settings:
IE browser setting:
In the Menu bar select Tools -> Internet Options (as shown in fig-1)



(fig-1)


Now form Internet Options dialog select Security -> Restricted sites -> Sites
(as shown in fig-2)



(fig-2)


Now enter the URL of the blacklisted sites and click Add (as shown in fig-3)




(fig-3)


Now click close->Apply ->OK.

You can also make an entry in %systemroot%/system32/driver/etc/hosts file as below:
127.0.0.1       www.xyz.com

In Linux (Ubuntu /RHEL):

Its very simple to restrict a site in Linux based system.

gedit or vi /etc/hosts and make the following entry:

0.0.0.0     www.youtube.com (any site you want to restrict)
0.0.0.0     www.facebook.com

or

127.0.0.1   www.xyz.com

Find out Hardware configuration of Linux / Ubuntu based system

In Windows OS based system it's very easy to find out the system configuration by following commands:
(1) Run -> msinfo32
(2) Run ->cmd -> systeminfo
( You can even redirect the output from monitor to printer or a file by suffix the above command with > file_name.txt )

In RHEL or Ubuntu it's similarly easy too:

(I) Using /proc - there's important info located in this directory! cd /proc, then ls; use cat to read the files in /proc such as cpuinfo, devices, filesystems, meminfo, partitions, swaps, uptime, version, etc.; also, you can cd into the subdirectories in /proc, for example, cd driver
(1)# cat/proc/cpuinfo >cpu.txt
(2)# cat/proc/meminfo >mem.txt
(3)# cat/proc/swaps >swap.txt
(4)# cat/proc/version >ver.txt

(II) Using dmidecode (for memery)
# dmidecode | less
or
# dmidecode >dmi.txt
or
# dmidecode -t memory
or
# dmidecode --type 17


Sunday, August 1, 2010

How To Disable User Access Control (UAC) Popups in Windows

"Windows needs your permissions to continue."

User Account Control can be annoying, but you should think twice before disabling it. UAC's pop-ups make it simpler to use a standard Vista account since you can temporarily elevate to an administrator account by typing a password. Using a standard user account helps to protect your computer from attack since malware's impact can be limited when not running with administrator rights.
If you still want to disable UAC popups, follow these instructions to disable User Account Control.

(a) Type "user account" into the Windows Vista Start menu and click on User Account when it appears in the Programs list.

(b) Click on the Turn User Account Control on or off-link.

(c) If UAC is currently turned on, you will be prompted for approval. Provide the administrator's password or click Continue if you are sure you want to turn UAC off.

(d) This isn't a time when you should just blindly dismiss the UAC prompt. It's best to use a standard account for your general computing and provide an administrator's password when UAC prompts. It helps protect your computer from attack. If you do turn off UAC, seriously consider the implications and think about turning it back on as soon as possible.

 (e) Uncheck the box next to Use User Account Control (UAC) to help protect your computer to disable UAC. Click OK to save your changes.

Windows 7/8 Secuity Settings

Introduction

1. The flexibility and convenience of Windows-based Operating System (OS) has resulted in being a widely used desktop environment. It is essential to use these desktop environments in a secure manner to avoid exploitation of the possible vulnerability of the OS. This article explains how to configure the security settings in Windows Operating System.

Windows Security Center

2. The Windows Security Center in Windows 8 /Windows 7 lets you view and change important security settings. It monitors your settings and notifies you if there is a problem. It is intended to serve as a hub to your computer's security settings, making it easier to understand what you need to do to keep your computer secure. Although you can choose settings other than those recommended, the Center helps you know when your settings are different from those suggested by Microsoft.

3. The control panel for the Windows Security Center organizes security settings into four categories for easy viewing. A green background indicates the category's settings are optimal, yellow indicates the settings may need attention, and red indicates a problem likely exists.

4. The easiest way to open the Windows Security Center is to type "security center" into the search box integrated into the Vista Start menu. The list of programs will be filtered down to only the Security Center, and you can start it by clicking the link or pressing Enter. You can also access the Security Center through the Windows Vista Control Panel. 5. Click on one of the links below to learn about the security settings Windows Security Center monitors.

Firewall
 
6. The firewall category in the Windows Security Center lets you see if Windows Firewall is on. Windows Firewall is a free firewall included in Windows Vista that can prevent unwanted access to your computer.

7. If you turn it off, Windows Security Center will draw your attention to the problem by changing the background of the category heading to red. A button makes it easy to turn Windows firewall on, or you can click on the Windows Firewall link in the left panel to change the Windows firewall settings
 
Automatic Updating
 
8. The automatic updating category of the Windows Security Center lets you easily see if your computer is configured to automatically download and install security and other updates from Microsoft. If your computer isn't configured for automatic updates, a button to change the settings is provided. You can also click the Windows Update link in the left panel to change your settings.
 
Malware Protection
 
9. The malware protection category in the Windows Security Center monitors your use of antivirus and other anti-malware software. Windows Vista includes Windows Defender, a program that protects against spyware and other malware. Vista does not, however, include an antivirus program. The Windows Security Center makes it easy to see if you have the malware protection you need, and it provides links to help you purchase antivirus software and control Windows Defender.
 
Other Security Settings
 
10. Windows Security Center also monitors your Internet Explorer options and makes sure you have User Account Control turned on. The Internet Explorer options help to secure your computer and data from malicious Web sites while User Account Control prevents unwanted changes to your system.


Thursday, November 26, 2009

DNS Cache Poisoning

To understand it better, we must know what is DNS and what's its role?

In the world of the Internet and TCP/IP, IP addresses are used to route packets from source to destination. A single IP address, for example, 203.192.135.234, is not difficult to remember. But trying to learn or track thousands of these addresses, including which server/node is associated with each address, is a daunting task. So instead, we use domain names to refer to systems with which we want to communicate.

A real-world Internet domain name example is google.com. When you enter the Google domain name into the address bar of your browser, the Google page appears. This is because your PC executed a process to resolve google.com to an IP address. Only by having the IP address is a system able to initiate a session with another system across the Internet. Let‘s look at two ways IP address resolution can occur.

DNS Resolution Process

Figure 1 depicts the domain name/IP address resolution process when the target system and DNS server are internal. In this example, a workstation must establish a session with a server with a domain name of farpoint.company.com. In order for a workstation to implement DNS, it must be running a DNS Client or Client Resolver. The resolver initiates the following process, resulting in the conversion of the domain name to an IP address. 


Figure 1

Step 1: The resolver checks the resolver cache in the workstation‘s memory to see if it contains an entry for Farpoint.company.com. The entry would be present if the workstation had resolved the name to an IP address since the last time it was powered on, and the Time to Live of the entry had not been exceeded. In this example, no entry is found.

Step 2: Having found no entry in the resolver cache, the resolver sends a resolution query to the internal DNS server.

Step 3: When the DNS server receives the query, it first checks to see if it‘s authoritative for the company.com domain. In other words, is it responsible for managing the zone in which the company.com domain resides? If it is, the server performs a lookup in its internal zone table. In this case, it finds a host Resource Record (RR) that includes the IP address for Farpoint.company.com.

Step 4: The IP address of Farpoint.company.com is returned to the resolver.

Step 5: The resolved domain name and IP address are placed into the resolver cache. Figure 2 is an actual listing of the contents of a workstation‘s resolver cache. The IP address is used to contact farpoint.


Figure 2

What is DNS Cache Poisoning?

DNS cache poisoning is a maliciously created or unintended situation that provides data to a Domain Name Server that did not originate from authoritative DNS sources. This can happen through improper software design, misconfiguration of name servers and maliciously designed scenarios exploiting the traditionally open-architecture of the DNS system. Once a DNS server has received such non-authentic data and caches it for future performance increase, it is considered poisoned, supplying the non-authentic data to the clients of the server. 9. DNS cache poisoning consists of changing or adding records in the resolver caches, either on the client or the server so that a DNS query for a domain returns an IP address for an attacker‘s domain instead of the intended domain. How this might work is shown in Figure 3


Step 1: The resolver checks the resolver cache in the workstation‘s memory to see if it contains an entry for farpoint.companyA.com.

Step 2: Having found no entry in the resolver cache, the resolver sends a resolution request to the internal DNS server.

Step 3: When the DNS server receives the request, it first checks to see if it‘s authoritative. In this case, it isn‘t authoritative for companyA.com. The next action it takes is to check its local cache to see if an entry for farpoint.companyA.com exists. It doesn‘t. So in Step 4, the internal DNS server begins the process of iteratively querying external DNS servers until it either resolves the domain name or it reaches a point at which it‘s clear that the domain name entry doesn‘t exist.

Step 4: A request is sent to one of the Internet root servers. The root server returns the address of a server authoritative for the.COM Internet space.

Step 5: A request is sent to the authoritative server for .COM. The address of a DNS server authoritative for the companyA.com domain is returned.

Step 6: A request is sent to the authoritative server for companyA.com. This is identical to the standard process for an iterative query – with one exception. A cracker has decided to poison the internal DNS server‘s cache. In order to intercept a query and return malicious information, the cracker must know the transaction ID. Once the transaction ID is known, the attacker‘s DNS server can respond as the authoritative server for companyA.com. Although this would be a simple matter with older DNS software (e.g. BIND 4 and earlier), newer DNS systems have built-in safeguards. In our example, the transaction ID used to identify each query instance is randomized. But figuring out the transaction ID is not impossible. All that‘s required is time. To slow the response of the real authoritative server, cracker uses a botnet to initiate a Denial of Service (DoS) attack. While the authoritative server struggles to deal with the attack, the attacker‘s DNS server has time to determine the transaction ID. Once the ID is determined, a query response is sent to the internal DNS server. But the IP address for farpoint.companyA.com in the response is actually the IP address of the attacker‘s site. The response is placed into the server‘s cache.

Step 7: The rogue IP address for Farpoint is returned to the client resolver. Step 8: An entry is made in the resolver cache, and a session is initiated with the attacker‘s site. At this point, both the workstation‘s cache and the internal DNS server‘s cache are poisoned. Any workstation on the internal network requesting resolution of Farpoint.companyA.com will receive the rogue address listed in the internal DNS server‘s cache. This continues until the entry is deleted.

Another method used to poison a DNS cache is the use of a recursive query sent by the attacker. The query can force the target server to connect to the authoritative source of the domain in the query. Once connected, rogue information about one or more domains might be sent to the querying server and posted to the server‘s cache.

Potential Consequences of Cache Poisoning

The following are the consequences of using a poisoned DNS cache:-

(a) Pharming. This is the primary risk associated with cache poisoning. Crackers employ pharming for four primary reasons namely identity theft, distribution of malware, dissemination of false information, and man-in-the-middle attacks.

(b) Identity Theft. Once an attacker gets you to his site, he‘ll try to trick you into leaving behind information he can use to impersonate you. One way to do this in the first example is to create a site identical to the real Farpoint.companyA.com. When the user connects using the poisoned cache information, he might be fooled into entering information about himself through apparently legitimate requests for his name, address, etc.

(c) Distribution of Malware. Another objective of attackers using cache poisoning is the automatic distribution of malware. Instead of releasing malicious code into the Internet and realizing random results, the use of rogue IP addresses to redirect unsuspecting users to the attacker‘s site can be a more focused attack vector. Once a workstation initiates a session with the malicious site, malware is uploaded to the workstation without intervention by or the knowledge of the user.

(d) Dissemination of False Information. This aspect of pharming is useful to attackers who want to spread self-serving information about an organization.

(e) Man-in-the-middle Attack. In this attack type, the workstation initiates a session with the attacker‘s server. The attacker‘s server initiates a session with the actual target site. All information flowing between the workstation and the genuine site passes through and is intercepted by the cracker‘s server.

There can be serious consequences when security is an afterthought during the configuration and deployment of DNS servers. The next section provides guidelines that can help prevent cache poisoning.

Cache Poisoning Attacks

Normally, an Internet-connected computer uses a DNS server provided by the computer owner's Internet Service Provider or ISP. This DNS server generally serves the ISP's own customers only and contains a small amount of DNS information cached by previous users of the server. A poisoning attack on a single ISP DNS server can affect the users serviced directly by the compromised server or indirectly by its downstream server(s) if applicable. The analogy is applicable to the intranet also. To perform a cache poisoning attack, the attacker exploits a flaw in the Domain Name Server software that can make it accept incorrect information. If the server does not correctly validate DNS responses to ensure that they have come from an authoritative source, the server will end up caching the incorrect entries locally and serve them to users that make the same request. This technique can be used to replace arbitrary content for a set of victims with the content of an attacker's choosing. For example, an attacker poisons the IP address DNS entries for a target website on a given DNS server, replacing them with the IP address of a server he controls. Then the attacker creates fake entries for files on the server they control with names matching those on the target server. These files could contain malicious content, such as a worm or a virus. A user whose computer has referenced the poisoned DNS server would be tricked into thinking that the content comes from the target server and unknowingly download malicious content.

Variants

In the following variants, the entries for the server ns.mywebsite.org would be poisoned and redirected to the attacker's nameserver at IP address w.x.y.z. These attacks assume that the nameserver for mywebsite.org is ns.mywebsite.org. To accomplish the attacks, the attacker must force the target DNS server to make a request for a domain controlled by one of the attacker's nameservers.

Redirect the Target Domain's Nameserver

The first variant of DNS cache poisoning involves redirecting the nameserver of the attacker's domain to the nameserver of the target domain, then assigning that nameserver an IP address specified by the attacker.
DNS server's request: what are the address records for subdomain.example.com?
subdomain.example.com. IN A
Attacker's response:
Answer:
(no response)
Authority section:
example.com. 3600 IN NS ns.mywebsite.org.
Additional section:
ns.mywebsite.org. IN A w.x.y.z

Responding Before the Real Nameserver

The third variant of DNS cache poisoning, which is called DNS Forgery, involves beating the real answer to a recursive DNS query back to the DNS server. DNS requests contain a 16-bit nonce, used to identify the response associated with a given request. If the attacker can successfully predict the value of the nonce and return a reply first, the server will accept the attacker's response as valid. If the server randomizes the source port of the request, the attack may become more difficult, as the fake response must be sent to the same port that the request originated from.
By sending a number of simultaneous DNS requests to the server to force it to send more recursive requests, the probability of successfully predicting one of the request nonces increases.

Steps for DNS Protection

The first layer of defense against cache poisoning is the use of the latest version of DNS. DNS based on BIND 9.3.x or Microsoft Windows Server 2003 is far more secure than DNS implemented with earlier versions. Successful completion of the first poisoning example would have been more difficult because these systems also randomize the port used for the DNS query in addition to the transaction ID.

Recursive queries should be limited to internal DNS servers. If Internet-facing recursive queries are required, only queries from internal addresses should be accepted. This will help prevent outside systems from sending queries with malicious intent. The following steps provide additional guidance:- (a) Physically separate external and internal DNS servers. (b) Restrict zone transfers to authorized (secondary servers) devices. (c) Use TSIG to digitally sign zone transfers and zone updates – one of the best ways to prevent poisoning is to force identification of the sending authoritative source. (d) Restrict dynamic DNS updates when possible. (e) Hide the version of BIND being used on the DNS servers. (f) Remove unnecessary services running on the DNS servers. (g) Where possible, use dedicated appliances instead of multi-purpose servers.

Prevention and Mitigation

Many cache poisoning attacks can be simply prevented by DNS servers being less trusting of the information passed to them by other DNS servers, and ignoring any DNS records passed back which are not directly relevant to the query. For example, recent versions of BIND now contain code that performs these checks. As stated above, source port randomization for DNS requests, combined with the use of cryptographically-secure random numbers for selecting both the source port and the 16-bit nonce, can greatly reduce the probability of successful DNS race attacks. A secure version of DNS, DNSSEC, uses cryptographic electronic signatures signed with a trusted digital certificate to determine the authenticity of data. DNSSEC can counter cache poisoning attacks, but as of 2008 is not widely deployed.

This kind of attack may also be mitigated at the transport layer or application layer to perform end-to-end validation once a connection is set up to an endpoint. A common example of this is the use of Transport Layer Security and digital signatures. For example, by using the secure version of HTTP, HTTPS, users may check whether the server‘s digital certificate is valid and belongs to a website‘s expected owner. Similarly, the SSH remote login program checks digital certificates at endpoints (if known) before proceeding with the session. For applications that download updates automatically, the application can embed a copy of the data‘s signing certificate locally and validate the signature stored in the software update against the embedded certificate.

Conclusion

DNS cache poisoning is a large risk for organizations running early versions of DNS solutions. The elevated risk extends to organizations that carelessly deploy DNS, regardless of the DNS software version used. Careful attention to version management and the secure configuration of DNS devices should reduce risk from cache poisoning to an acceptable level.

Wednesday, April 1, 2009

Speed-up your Internet connection

The Truth

The system reserves 20% of your band-width. Means you are paying your ISP for 100% , where as you are using only 80% of it. Cheated no....

How to free your Band-width

(1) Run -> gpedit.msc
(2) Local Computer Policy -> Computer Configuration -> Network ->QoS Packet Scheduler -> Limit reservable bandwidth



(3) Double click Limit reservable bandwidth


(4) Click Enable and set Bandwidth limit to 0 %

Now you will be able to use 100% of your Internet band width.


Monday, March 16, 2009

Make a Hidden Folder (Folder Without Name)

(1) Right Click on desktop ->new -> Folder
(2) Rename folder ATL + 255 ( Press ALT Key and type 255 with numpad).
(3) Right Click the Folder -> Properties ->Customize -> change icon.
(4) Select the blank icon.



You are done.........
Where is your folder ???

Saturday, March 14, 2009

Disable or Hide Administrative Shares

Hidden Shares:

A hidden share is identified by a dollar sign ($) at the end of the share name. Hidden shares are not listed when you look through the shares on a computer or use the net view command. Windows create hidden administrative shares that administrators, programs, and services can use to manage the computer environment on the network. By default, Windows can enable the following hidden administrative shares:

(1) C$ D$ E$ - Root of each partition. For a Windows workstation computer only members of the Administrators or Backup Operators group can connect to these shared folders. For a Windows NT Server/W2K Server computer, members of the Server Operators group can also connect to these shared folders.

(2) ADMIN$ - %SYSTEMROOT% This share is used by the system during any remote administration of a computer. The path of this resource is always the path to the system root (C:\Windows).

(3) FAX$ - On W2K Server, this used by fax clients in the process of sending a fax. The shared folder temporarily caches files and accesses cover pages stored on the server.

(4) IPC$ - Temporary connections between servers using named pipes essential for communication between programs. It is used during remote administration of a computer and when viewing a computer's shared resources. This share can be very dangerous and can be used to extract large amounts of information about your network, even by an anonymous account.

(5) NetLogon - This share is used by the Net Logon service of a computer while processing domain logon requests, and by Pre-W2K computers when running logon scripts.

(6) PRINT$ - %SYSTEMROOT%\SYSTEM32\SPOOL\DRIVERS Used during remote administration of printers. This shares may not be used , if you are not connect to any LAN /WAN. These shares are hidden, but available with full control to domain administrators. The drive letter, followed by the $ sign is the name, and it is shared from the root. When trying to attain a highly secure network, you may wish to address this potential security issue by disabling these shares, or at least restricting their permissions to specific users or services. Better practice to disable these hidden shares.

How to disable:

There are two ways to disable it.

(1) Right Click My Computer -> Manage ->Shared Folders ->Shares -> Right Click on the Share and Disable.

(NOTE: If you disable an administrative share , it will not be automatically enabled after you restart your computer. )




(2) Permanently disable by using folowing regedit:

Hive:HKEY_LOCAL_MACHINE
Key:SYSTEM\CurrentControlSet\Services\LanManServer\Parameters
Name:AutoShareServer (for Windows 2000/2003/2008)
Name: AutoShareWks (for Win XP/Vista)
Type: REG_DWORD
Value: 0 



Security Risk:

Unfortunately this registry hack does NOT stop the IPC$ share and this is a share that is often used by hackers to enumerate systems before attack since it can yield a wealth of information about your system names, your user names, and more. If your ACL permissions are not correct or you haven't disabled anonymous user access or you haven't disabled the guest account then this port can lead to total system compromise !

Friday, March 13, 2009

Hide Your Computer Name And Disable File Shares

NetBIOS Vs DNS:

Earlier Netbios was used instead of DNS for name resolution. But after 2000, Windows started using DNS (Domain Name System) and SMB (Server Messsage Block) Direct Hosting at TCP/IP port 445 for requests instead of port 139
.
The Risk:

This is basically used for name resolution and File sharing. NetBIOS on the WAN or over the Internet, however, is an enormous security risk. All sorts of information, such as your domain, workgroup and system names, as well as account information is obtainable via NetBIOS.

The SMB (Server Message Block) protocol is used among other things for file sharing in Windows OS. In Windows Servers it ran on top of NetBT (NetBIOS over TCP/IP), which used the famous ports 137, 138 (UDP) and 139 (TCP). In Windows, Microsoft added the possibility to run SMB directly over TCP/IP, without the extra layer of NetBT. For this they use TCP port 445. By standard both port 139 and 445 is open to get the highest degree of compatibility. A client will try to request on both ports and continue the communication on the port which responds first.

How to Disable?

Disable SMB use of Netbios port 139 (Forces use of port 445):
  1. On the Start menu, point to Settings, and then click Network and Dial-up Connections
  2. Right-click Internet facing connection, and then click Properties.
  3. Select Internet Protocol TCP/IP and select Properties
  4. Click Advanced and select the WINS tab
  5. Tick Disable NetBIOS over TCP/IP and click Ok
To disable SMB use of port 445 with this DWORD (Forces use of port 139):
[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \NetBT \Parameters]
SMBDeviceEnabled = 0
Disable SMB use of port 139 and 445 (Disables nbt.sys driver):
  1. Right-click My Computer on the desktop, and then click Manage.
  2. Expand System Tools, and then select Device Manager.
  3. Right-click Device Manager, point to View, and then click Show hidden devices.
  4. Expand Non-Plug and Play Drivers.
  5. Right-click NetBios over Tcpip, and then click Disable.
Disable SMB completely:
  1. On the Start menu, point to Settings, and then click Network and Dial-up Connections
  2. Right-click Internet facing connection, and then click Properties.
  3. Select Client for Microsoft Networks, and then click Uninstall.
  4. Follow the uninstall steps.
  5. Select File and Printer Sharing for Microsoft Networks, and then click Uninstall.
  6. Follow the uninstall steps.
If you are using a router as your Internet gateway then you will want to ensure that it does not allow inbound or outbound traffic via TCP ports 135-139.
If you’re using a Firewall then you should also block the same ports - TCP ports 135-139.

Thursday, March 12, 2009

Clipboard Hack:

Shocking News about CTRL + C :

Ctrl + C may be the most important and frequent work we do everyday. But it’s not very safe thing to do. Read on to know why? What happens when you press Ctrl + C while you are online?

We do copy various data by Ctrl + C for pasting elsewhere. This data is stored in clipboard and accessible from the net by anyone by using JavaScript and ASP. This is called clipboard Hack.

Just Try this:

1. Copy any text by Ctrl + C
2. Click on the link : http://www.sourcecodesworld.com/special/clipboard.asp
3. You will see the text you copied will be accessed by this web site.

Surprise!

Don’t you? It is extremely easy to extract the data stored in your clipboard to steal your sensitive information. So do not keep sensitive data (like Password, Credit card No, Pin No etc.) in the clipboard while you are connecting to net.

It’s true that the data last copied for paste operation can be stolen when you visit such web site which uses these scripting languages and your sensitive data will be saved on the database of others server.

How it works :

It can be done by using this simple JavaScript:
/*
var content = clipboardData.Getdata(“Text”);
alert (content) ;

*/
How to Overcome this hack :

To avoid this hack use following settings in your browser (IE):
1. Tools ->Internet options ->security ->Internet ->custom level
2. Scripting -> Allows paste operation via script ->disable.

Now the content of your clipboard is safe.

In latest versions of IE, this issue has been fixed :)