Wednesday, October 29, 2008

How To Enable Telnet For Root User

How To Enable Telnet For Root User

Just add entries to the end of /etc/securetty file :
...
pts/0
pts/1
pts/2
...
pts/10

I mistakenly entered 'pts0' etc. It should be 'pts/0' . There was no
need to restart in ReadHat 7.x. I could telnet as root both from WinNT
and another Linux host.

Using SSH is highly recommended as telnet as root is a definite secuirty
risk.

HTH
----------------------------------------------------------------------
You really shouldn't do this, you should login as another user and then
use 'su' to access the root account.
( Actually, you should disable telnet altogether and use ssh instead =)

The reasons for that are as follows:

1) Telnet is not an encrypted protocol. This means that any network you go through on your way to your system has the potential to sniff the packets you are sending, and gain the data you are transmitting, including your root password.
( Note that using su doesn't solve this problem.)

2) Instead of having to hack a user account first and THEN root, an intruder can go straight for the root account, so you have pretty much cut the time for a brute-force attack in half.

But, putting all security concerns aside, if you edit /etc/securetty and add pts[0-f] ( formerly ttyp[0-f] ) you should be able to login as root via telnet. ( Unsure if you need to reboot or not ).

This file controls which terminals root can login from, and ptsx are the ports used when telnetting into linux. ( On Redhat 6.2 anyway )

Alternatively, you can edit the /etc/pam.d/rlogin file and comment out the line:

auth required /lib/security/pam_securetty.so

which will disable the use of the securetty file altogether.
( Very much _not_ recommended, but I thought I should mention it )

Hope that helps.

These folks are right, you should disable telnet and use ssh only. Beyond that you should set ssh to refuse a root login. Login as a normal user and su to root.

Linux In a Windows Network with SAMBA

Linux In a Windows Network with SAMBA

Integrating Fedora Linux into a Windows network is reasonable and easy as long as you use the SAMBA utilities. I share every main step necessary to implement such a SAMBA server within a Windows environment.
Once integrated a Linux server looks and acts exactly like any other server on a Windows intranet. You will have the ability to drag and drop files, view server contents and directories using Windows File Manager, and even edit files on a Linux server from any Windows desktop.
This article is a guide to setting up a full fledged FEDORA LINUX/SAMBA server. If you need basic steps for connecting Linux with Windows please read my article Windows to Linux: Basic Networking. If you're a system administrator and are planning to integrate the Linux server into your AD server environment, I'm sorry I do not go into details how to configure smb.conf for ADS usernames, although it can be done. I will walk you through the main steps for installing a SAMBA Server. This, in my opinion, is the first part to any future more advanced integration.
First, you must allow the Linux server full rights and access to the Windows workgroup and local domain. That means that either in your Active Server environment you need to reserve an IP address for the Linux server, or you simply need to ensure a hard coded IP address is given to the Linux server. The server must have a reserved IP address whether you deliver it via DHCP or statically assign it in the DNS. This also means that you need to ALLOW SMB DAEMON to operate. You can ensure your system security does this by editing your Firewall setup or using system-config-securitylevel .
Second, you must ensure that SAMBA (SAMBA tools and the SMB protocol) is installed and running on the Linux server. Most versions of Fedora come with the necessary packages. You should also be sure to update your SAMBA security levels properly if you are having trouble accessing a shared directory. This is found under Samba Server Configuration tool, main menu Properties, option Server Settings, and then the tab: Security.
Now you are ready to configure your Fedora Linux/SAMBA machine... aka. SAMBA Server.
STEP 1: Enable Network Connectivity to the SAMBA Server
Using the Fedora Network Configuration tool you will need to ensure that the ethernet card is enabled and properly functioning. Get quick access to the tool through this command: system-config-network
Once in the Network Configuration tool, you should ensure that your ethernet device is enabled. If it is not, select the eth device and then click on the Edit button. This will allow you to input the vital network adapter settings including: statically set IP address, subnet mask, and gateway. You should also select the top checkbox labeled Activate device when computer starts. Read this article for more details regarding configuring a network card in Fedora, Mandrake, or SuSE.
Close and save any changes you've made. The main goal is to ensure you have an ACTIVE and functioning network card on the SAMBA server.
Restart the network services or simply reboot your SAMBA server. Now try a ping to the server from another PC on the same subnet. At a command prompt, for example, type: ping 10.2.2.3
The ping should come back good validating your network connection. If you need more Linux system administration help read my Admin Commands List.
STEP 2: Update Firewall Settings
In most cases the default Firewall setting on the SAMBA server locks out any inbound network requests. I've had a great many people come running to me about this issue. If you're setting up a basic SAMBA server within your business intranet, allow your ethernet connection to be a trusted device so others can get to your SAMBA server and not be bounced by the server's Firewall.
NOTICE: if you plan to use the SAMBA server outside of your business firewall/intranet you should NOT follow the next step. Instead you allow your local server to receive packets by making changes to your IPTABLES, such as:
iptables -A INPUT -s 192.168.0.0/255.255.255.0 -j ACCEPT
The following step is for those using an intranet business server configuration.
Okay, now to allow your intranet based SAMBA server to properly accept incoming requests, from your Main menu choose System Settings, then Security Level. You can access this also by typing the command:
system-config-securitylevel
Please select the box next to the ethernet card you are using for intranet connectivity so that it becomes a TRUSTED DEVICE. Otherwise you have a super secure server that bounces inbound requests. Notice, this selection effects all the items in the Services listing above it, so please be careful in what context you allow a trusted device!
Press OK when finished.

STEP 3: Enable SMB Services
Ironically, the SMB daemon and other core services are usually NOT started by default. You will need to change this so that your SMB daemon is now started.
Using the GUI from the main menu, go to System Settings, then Server Settings, then choose Services. You can also get to this using the command: system-config-services



While you're looking over this long list of services, please DISABLE things you know for sure you do not need to run on this SAMBA server. For instance apmd, isdn, etc. But also ensure that key services such as SMB are selected and RUNNING. Select SMB and press the Start button. If it is supposedly already running you can press the Restart button to be sure it is indeed running correctly now.
Now press the Save button to make sure the configuration changes have been saved for future restarts.
Sometimes using the GUI just does not properly restart the SMB daemon. In such odd cases, I want to suggest you force a manual restart from the command line with this command: /etc/rc.d/init.d/smb restart
If you keep having startup failures, where for every reboot you need to perform Step 3, you may need to manually configure your start up processes so that SMB will always be in the init.d bootup. Okay, if that sounded ridiculously confusing then how about just going to my article on manually starting services and configurations.

STEP 4: Create Server Users & Directories
You will need to ensure that people also have a login to the SAMBA server to do their work. Logins should be provided on an as needed basis. Obviously, in most cases the users accessing the SAMBA server will be a subset of the total users on the Windows business network.
Create user logins with the Gnome User Manager tool in Fedora. You can find this from the main menu by choosing System Settings, then Users & Groups. The command for this is: system-config-users
Notice this is the first step in creating SAMBA users, which comes later.
Add as many users as you need and then move on to the next part, which is creating directories (aka. folders) for use.
This is such an obvious step most people usually forget to think about it before hand. However, it is very helpful to think ahead what directories you will allow access to on the SAMBA Server for business use. In my case the people needing SAMBA server access will be updating webpages. Therefore, I do not need to add any other folders for file sharing or group interaction. Be sure you add any folders in a reasonable and ordered fashion.
A big TIP for those who are not aware, the permissions settings for your folders are very important. If you have no idea how to change permissions, then you may want to review this article on Linux filemanagement and permissions.

STEP 5: Configure the SAMBA Server
It's time to configure your SAMBA server to allow others on the intranet to login and use the server from Windows or Linux PCs.
From the main Fedora menu, choose System Settings, then Server Settings, then Samba. You can also get to this tool by typing the command: system-config-samba
You are about to make changes to the SAMBA Configuration file called smb.conf. This file is found under /etc/samba. If you encounter issues you may want to first start by using my example smb.conf file and then make the changes below. I also want you to be aware that you can edit configuration files with the web interface tool called Samba Web Administration Tool(SWAT) and several others. Now lets move ahead using the Configuration tool using the preloaded Fedora tools. NOTICE that many people begin by tinkering with their .conf file... this is NOT a good idea. First ensure that the basic samba connectivity works and THEN you can tinker with the smb.conf! (see troubleshooting below)
A. Begin by Making Changes to the Server Settings
Under the Preference menu item choose Server Settings...




Be sure to include the Windows workgroup name. In the example above the workgroup has been changed to net. Your situation may be different. In many cases naming the workgroup simply workgroup is fine, so long as your Windows PCs connect to this same name.
Under this same window, click on the Security tab. It comes by default with the appropriate settings for a basic SAMBA Server. The Authentication mode should be User. You would need to change this only if you plan to allow logins based on the Microsoft ADS.
Press OK to finish making basic changes to the server.
B. Select SAMBA Users
Under the Preference menu item choose Samba Users
In this window you must Add at least one user who will have access to the SAMBA Server. Notice that only user accounts you created in step 4 should be added to this listing.



Press the Add User button, then from the pull down select a user. Fill out the additional information needed for this SAMBA user. Press OK when finished.
C. Adding A Shared Folder
Under the SAMBA Server Configuration window, you must create at least one SAMBA share directory.
Press the Add button and then the Browse button. Now choose a folder you wish to make available to SAMBA users. Be careful, some folders have permissions settings that do not allow sharing. Now be sure to select the Read/Write option to allow people full access. Don't press OK yet!



You should see your shared folder appear under the listing as shown in the example above.
D. Adding Users
In the same window, select the second tab labeled Access. From here choose the first option labeled Only allow access to specific users and select the users you wish to give access to this specific SAMBA shared folder. Press OK when finished.
You can repeat steps C and D for each new shared folder.
Once completed, please choose File from the menu then choose Quit.
Hopefully this saved all of your settings properly. If you encounter issues with the graphic SAMBA configuration tool, such as it failing to accept your changes, then please read the Troubleshooting Tip 4 located below.

STEP 6: Restart the SAMBA Services
Now you need to restart all SAMBA services. You can use the process found in Step 3, except press the Restart button or use the word restart instead of the word start.
I mentioned earlier that sometimes your changes do not get properly picked up. I've installed so many different Fedora SAMBA configurations that I can't recall every reason. This may be a very good time to simply reboot the LINUX/SAMBA Server. Rebooting will ensure everything gets properly started up and all of the configuration changes are included. More importantly, this is likely the last time you will ever restart your SAMBA server again. Some of my FEDORA servers haven't been restarted in years.

STEP 7: Access the SAMBA Server from Windows
You're now ready to fully utilize your new intranet SAMBA Server for work. On any Windows PC you can access the server by simply going to the main Start menu, choosing Run and typing in the hostname of your SAMBA server. For example: \\linuxserver
Please notice that in the Windows environment you use different slashes and you need to ensure this syntax.


If this does not work, perhaps if the server is not yet included in your DNS, try accessing the SAMBA Server through its IP address: \\10.2.2.3
Obviously you need to use an actual hostname or IP address and not my example.
If all works well you should instantly see a SERVER LOGIN window. Now login using a SAMBA created username.

You should then instantly see the shared folder as well as the individual user's personal folder that exist on the SAMBA Server



Congratulations, you're done.

TROUBLESHOOTING TIPS
NOTICE: I've had a number of people who encountered issues because they seriously screwed with their smb.conf file or forgot to update their Samba Server Security settings found under the Server Setup, Security tab. Please, please, before you start tinkering with your smb.conf file try to use the BASIC samba settings to ensure you ACTUALLY CAN CONNECT properly. Then when you make changes you can far better identify what goes wrong. Following the steps above should work in almost every situation IF you first start with the basic configuration.
1. SAMBA Server is not accessible
First and foremost try a reboot to the server itself! It is vital you do this before someone talks you into changing configs, playing with your network card settings etc. Just reboot and try again to see if it clears up the issue.
2. Network Unreachable or Host Unreachable From Linux PCs
Trying to connect from another Linux PC and nothing happens or "network unreachable" may be as ridiculous as an incorrect SAMBA connection. Make absolutely certain that the connection is typed in exactly as follows (obviously changing the workgroup name to your windows workgroup): smb://WORKGROUP
On some KDE desktops, attempts failed because the syntax incorrectly tries: smb:/workgroup Those // are quite important!
3. Failure to Connect from Windows PCs
Not connecting to the server from Windows PCs may be a result of bad network configuration. Are you absolutely certain you entered the correct network details? Please double check to make sure that you have a proper hostname for the Samba server, that you have a working IP address, and the correct Subnet and Gateway included. In most cases these last two should simply match what your windows PCs have designated.
4. Changes to the configuration are not being picked up
The Gnome SAMBA Configuration GUI often encounters errors when trying to update new SAMBA settings. I've seen the GUI tool write a whole lot of garbage into the SAMBA configuration file (smb.conf). For this reason, as I mentioned earlier, you may need to start with a fresh clean smb.conf file (copy my example into a text editor) and try again, or you may need to manually adjust settings without the GUI.

5. Can't Share Folder in Home Directory
First, it's always a good idea NOT to make a Samba share out of directories inside your Home folder for security reasons. Making unique share folders is often the best bet. However, there are times when you need to share a folder and the way to do so is to update your Samba Share's security settings. Under the Samba Configuration, highlight your shared directory and press Properties. Here you can see the "Basic Permissions" list and usually the default is "Read Only." Select the "Read/Write" option and be sure to save your changes by quitting and then restarting the smb daemon. If this doesn't resolve the issue of directory shares, you may have a more fundamental security issue. You need to ensure that the over all Samba security settings under "Preferences", then "System Settings" and then the Security tab are correct.
For further troubleshooting these two webpages may be helpful as well:

Allow and deny IP for ssh in Linux

Allow and deny IP for ssh in Linux

We can allow and deny IP for ssh. To do this we have to change some configuration at /etc/host.deny and /etc/host.allow files. Suppose we want to deny 192.168.100.5, then we will edit the /etc/host.deny file and do some changes as follows.
vi /etc/host.deny
sshd:192.168.100.5
Save & exit
This will deny 192.168.100.5 to ssh.
Suppose we want to allow only 192.168.100.5 to ssh. Then we will edit two files as follows:
vi /etc/host.deny
sshd:all
save & exit
vi /etc/host.allow
sshd:192.168.100.5
save & exit
We can do the same by changing only at /etc/host.deny as follows:
vi /etc/host.deny
sshd:all except 192.168.100.5
save & exit

Deny root user for ssh

Deny root user for ssh

We can deny root user for ssh. For this we have to edit the sshd-config file. To do this we have to write the following command:
vi /etc/ssh/sshd-config
Now we will find out a line
PermitRootLogin=yes
We will replaced the yes with no.
PermitRootLogin=no
Now not only the root, but also all super user can not ssh at this ssh server.
To allow any user we have to add the following line at the last line of the configuration.
AllowUsers reza
This command will allow reza user.
AllowUsers reza nayem
This command will allow reza and nayem, both users.
We must have to restart the service after editing the file. Otherwise it wont work.
Any advice regarding this issue is highly expected

Changing The Port Number at SSH

Changing The Port Number at SSH

We can change the port number of ssh. By default the port number of ssh is 22. To change the port address we have to edit the file /etc/ssh/sshd-config. We can do this with the following command.
vi /etc/ssh/sshd-config
In this file we will find a line
port 22
We will replace the 22 with 29 and then save the file.
Now we will restart the service sshd.
service sshd restart
/etc/init.d/sshd restart
Now to ssh at this server or os we have to write the following line
ssh -p 29 root@192.168.100.5

Logging at a Server With SSH

Logging at a Server With SSH

We can log in at a server or pc with ssh. For this here is some instruction.
1. Suppose we are at 192.168.100.1 and trying to ssh at 192.168.100.5 .
ssh 192.168.100.5
This command will try to connect the 192.168.100.5 as the user that he already logged in the 192.168.100.1. Suppose we are at the root user in the 192.168.100.1. Then the command will try to connect at 192.168.100.5 as the root user.
2. ssh reza@192.168.100.5
This command will try to ssh at 192.168.100.5 as the reza user.
3. ssh -l nayem 192.168.100.5
This command will try to ssh at 192.168.100.5 as nayem user.
4. ssh -p 29 root@192.168.100.5
This command will try to ssh at 192.168.100.5 using the port 29.
Thats all my knowledge about this issue. Expect to get any advice from you.

service start-up configuration For SSH

service start-up configuration For SSH

We almost everyone know about the start-up configuration at operating system. The operating system starts the services from start-up configuration while the OS starts. At Linux the same thing happens.
To check whether a service is at start-up configuration we can use the following command
chkconfig –list sshd
This command will show the start-up configuration for the sshd service.
We can add any service at startup in many ways.
1. chkconfig sshd on
With this command the service will start only in that run level in which the OS is running now. Suppose the OS is running on run level 3, then this command add the sshd service at startup of run level 3.
2. chkconfig –level 35 sshd on
This command sets the sshd to start at run level 3 and 5.
3. We know that for every run level there are files. Suppose for run level 3 there is a file /etc/init.d/rc3.d .
Here we will find some files that starts their name with either K or S . Starting with K means the service is not at startup config. S means it will start automatically.
If the sshd service is not setup at run level 3, then we will find a file K20sshd . If we rename the file S20sshd, then sshd service will be set for run level 3.
mv K20sshd S20sshd
Wish to get any comments and better advice from you.

SSH In Linux

SSH In Linux

Packages for ssh at Linux & Starting the service
openssh-server This package is for configuring the ssh at the server pc.
openssh-client This package is for configuring the ssh at the pc that will try to connect to other with that configuration.
We can check with the following command whether the packages are installed or not.
rpm -qa | grep openssh-server
We can install the packages with the following command.
rpm -ivh openssh-server
rpm -ivh openssh-client
Then we have to start the service with the following command
service sshd start
/etc/init.d/sshd start
At Debian we have to install with the following command
apt-get install ssh
At Debian after installing a package, the service starts automatically.
To start the ssh service at any time at Debian we have to use the following command
/etc/init.d/sshd start —- starts the service
/etc/init.d/sshd restart —- restarts the service
/etc/init.d/sshd stop —— stops the service
/etc/init.d/sshd reload —– reloads the service

Breaking root password at Debian

Breaking root password at Debian

Sometimes we may forget the root password. Then we need to login by breaking password. If we do not know how to break it, then we need to reinstall the OS and loose many important data. I want to share one way of breaking password at debian.
While booting you will be prompted some options like debian kernel XXX options. If you does not press any key the OS get boot on its by default type. To break the password you must stop the booting by pressing a key.
1. Then press e to edit
2. then type
boot: Linux init=/bin/sh
and press enter.
3. This will boot OS on run level 1, which wont want any password. Here you will need to mount the following things.
init-2.03# mount -n -o remount,rw /
init-2.03# mount -avt nonfs,noproc,nosmbfs
4. Now you can go to /etc and remove the password. To do so you have to remove root password from /etc/passwd and /etc/shadow. So…..
init-2.03# cd /etc
init-2.03# vi passwd
init-2.03# vi shadow
That’s all. Now restart your OS and you will find that there is no root password. After logging as root just set a new root password.
Hope to hear from you about better procedure of breaking password.
There is another way to break password using knoppix. As far as I know knoppix is also a boot loader s/w that helps us to break root password of linux. But I did not ever break password using knoppix.

Configuring FTP in Linux

Configuring FTP in Linux

How To Download And Install VSFTPD
Most Linux software products are available in a precompiled package format. Downloading and installing packages isn't hard. If you need a refresher, Chapter 6, "Installing Linux Software", covers how to do this in detail. It is best to use the latest version of VSFTPD.
When searching for the file, remember that the VSFTPD packages' filename usually starts with the word vsftpd followed by a version number, as in vsftpd-1.2.1-5.i386.rpm for Redhat/Fedora or vsftpd_2.0.4-0ubuntu4_i386.deb for Ubuntu.
How To Get VSFTPD Started
With Fedora, Redhat, Ubunbtu and Debian You can start, stop, or restart VSFTPD after booting by using these commands:
[root@bigboy tmp]# /etc/init.d/vsftpd start
[root@bigboy tmp]# /etc/init.d/vsftpd stop
[root@bigboy tmp]# /etc/init.d/vsftpd restart
With Redhat / Fedora you can configure VSFTPD to start at boot you can use the chkconfig command.
[root@bigboy tmp]# chkconfig vsftpd on
With Ubuntu / Debian the sysv-rc-conf command can be used like this:
root@u-bigboy:/tmp# sysv-rc-conf on
Note: In RedHat Linux version 8.0 and earlier, VSFTPD operation is controlled by the xinetd process, which is covered in Chapter 16, "Telnet, TFTP, and xinetd". You can find a full description of how to configure these versions of Linux for VSFTPD in Appendix III, "Fedora Version Differences."

Testing the Status of VSFTPD
You can always test whether the VSFTPD process is running by using the netstat -a command which lists all the TCP and UDP ports on which the server is listening for traffic. This example shows the expected output.
[root@bigboy root]# netstat -a | grep ftp
tcp 0 0 *:ftp *:* LISTEN
[root@bigboy root]#
If VSFTPD wasn't running, there would be no output at all.
The vsftpd.conf File
VSFTPD only reads the contents of its vsftpd.conf configuration file only when it starts, so you'll have to restart VSFTPD each time you edit the file in order for the changes to take effect. The file may be located in either the /etc or the /etc/vsftpd directories depending on your Linux distribution.
This file uses a number of default settings you need to know about.
• VSFTPD runs as an anonymous FTP server. Unless you want any remote user to log into to your default FTP directory using a username of anonymous and a password that's the same as their email address, I would suggest turning this off. The configuration file's anonymous_enable directive can be set to no to disable this feature. You'll also need to simultaneously enable local users to be able to log in by removing the comment symbol (#) before the local_enable instruction.
• If you enable anonymous FTP with VSFTPD, remember to define the root directory that visitors will visit. This is done with the anon_root directive.
anon_root=/data/directory
• VSFTPD allows only anonymous FTP downloads to remote users, not uploads from them. This can be changed by modifying the anon_upload_enable directive shown later.
• VSFTPD doesn't allow anonymous users to create directories on your FTP server. You can change this by modifying the anon_mkdir_write_enable directive.
• VSFTPD logs FTP access to the /var/log/vsftpd.log log file. You can change this by modifying the xferlog_file directive.
• By default VSFTPD expects files for anonymous FTP to be placed in the /var/ftp directory. You can change this by modifying the anon_root directive. There is always the risk with anonymous FTP that users will discover a way to write files to your anonymous FTP directory. You run the risk of filling up your /var partition if you use the default setting. It is best to make the anonymous FTP directory reside in its own dedicated partition.
The configuration file is fairly straight forward as you can see in the snippet below where we enable anonymous FTP and individual accounts simultaneously.
# Allow anonymous FTP?
anonymous_enable=YES
...
# The directory which vsftpd will try to change
# into after an anonymous login. (Default = /var/ftp)
anon_root=/data/directory
...
# Uncomment this to allow local users to log in.
local_enable=YES
...
# Uncomment this to enable any form of FTP write command.
# (Needed even if you want local users to be able to upload files)
write_enable=YES
...
# Uncomment to allow the anonymous FTP user to upload files. This only
# has an effect if global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
...
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
...
# Activate logging of uploads/downloads.
xferlog_enable=YES
...
# You may override where the log file goes if you like.
# The default is shown below.
xferlog_file=/var/log/vsftpd.log
...
To activate or deactivate a feature, remove or add the # at the beginning of the appropriate line.
Other vsftpd.conf Options
There are many other options you can add to this file:
• Limiting the maximum number of client connections (max_clients)
• Limiting the number of connections by source IP address (max_per_ip)
• The maximum rate of data transfer per anonymous login. (anon_max_rate)
• The maximum rate of data transfer per non-anonymous login. (local_max_rate)
Descriptions on this and more can be found in the vsftpd.conf man pages.
FTP Security Issues
FTP has a number of security drawbacks, but you can overcome them in some cases. You can restrict an individual Linux user's access to non-anonymous FTP, and you can change the configuration to not display the FTP server's software version information, but unfortunately, though very convenient, FTP logins and data transfers are not encrypted.
The /etc/vsftpd.ftpusers File
For added security, you may restrict FTP access to certain users by adding them to the list of users in the /etc/vsftpd.ftpusers file. The VSFTPD package creates this file with a number of entries for privileged users that normally shouldn't have FTP access. As FTP doesn't encrypt passwords, thereby increasing the risk of data or passwords being compromised, it is a good idea to let these entries remain and add new entries for additional security.
Anonymous Upload
If you want remote users to write data to your FTP server, then you should create a write-only directory within /var/ftp/pub. This will allow your users to upload but not access other files uploaded by other users. The commands you need are:
[root@bigboy tmp]# mkdir /var/ftp/pub/upload
[root@bigboy tmp]# chmod 722 /var/ftp/pub/upload
FTP Greeting Banner
Change the default greeting banner in the vsftpd.conf file to make it harder for malicious users to determine the type of system you have. The directive in this file is.
ftpd_banner= New Banner Here
Using SCP As Secure Alternative To FTP
One of the disadvantages of FTP is that it does not encrypt your username and password. This could make your user account vulnerable to an unauthorized attack from a person eavesdropping on the network connection. Secure Copy (SCP) and Secure FTP (SFTP) provide encryption and could be considered as an alternative to FTP for trusted users. SCP does not support anonymous services, however, a feature that FTP does support.
Troubleshooting FTP
You should always test your FTP installation by attempting to use an FTP client to log in to your FTP server to transfer sample files.
The most common sources of day-to-day failures are incorrect usernames and passwords.
Initial setup failures could be caused by firewalls along the path between the client and server blocking some or all types of FTP traffic. Typical symptoms of this are either connection timeouts or the ability to use the ls command to view the contents of a directory without the ability to either upload or download files. Follow the firewall rule guidelines to help overcome this problem. Connection problems could also be the result of typical network issues outlined in Chapter 4, "Simple Network Troubleshooting".
Tutorial
FTP has many uses, one of which is allowing numerous unknown users to download files. You have to be careful, because you run the risk of accidentally allowing unknown persons to upload files to your server. This sort of unintended activity can quickly fill up your hard drive with illegal software, images, and music for the world to download, which in turn can clog your server's Internet access and drive up your bandwidth charges.
FTP Users with Only Read Access to a Shared Directory
In this example, anonymous FTP is not desired, but a group of trusted users need to have read only access to a directory for downloading files. Here are the steps:
1) Disable anonymous FTP. Comment out the anonymous_enable line in the vsftpd.conf file like this:
# Allow anonymous FTP?
anonymous_enable=NO
2) Enable individual logins by making sure you have the local_enable line uncommented in the vsftpd.conf file like this:
# Uncomment this to allow local users to log in.
local_enable=YES
3) Start VSFTP.
[root@bigboy tmp]# service vsftpd start
4) Create a user group and shared directory. In this case, use /home/ftp-users and a user group name of ftp-users for the remote users
[root@bigboy tmp]# groupadd ftp-users
[root@bigboy tmp]# mkdir /home/ftp-docs
5) Make the directory accessible to the ftp-users group.
[root@bigboy tmp]# chmod 750 /home/ftp-docs
[root@bigboy tmp]# chown root:ftp-users /home/ftp-docs
6) Add users, and make their default directory /home/ftp-docs
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user1
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user2
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user3
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user4
[root@bigboy tmp]# passwd user1
[root@bigboy tmp]# passwd user2
[root@bigboy tmp]# passwd user3
[root@bigboy tmp]# passwd user4
7) Copy files to be downloaded by your users into the /home/ftp-docs directory
8) Change the permissions of the files in the /home/ftp-docs directory for read only access by the group
[root@bigboy tmp]# chown root:ftp-users /home/ftp-docs/*
[root@bigboy tmp]# chmod 740 /home/ftp-docs/*
Users should now be able to log in via FTP to the server using their new usernames and passwords. If you absolutely don't want any FTP users to be able to write to any directory, then you should set the write_enable line in your vsftpd.conf file to no:
write_enable = NO
Remember, you must restart VSFTPD for the configuration file changes to take effect.
Sample Login Session To Test Functionality
Here is a simple test procedure you can use to make sure everything is working correctly:
1) Check for the presence of a test file on the ftp client server.
[root@smallfry tmp]# ll
total 1
-rw-r--r-- 1 root root 0 Jan 4 09:08 testfile
[root@smallfry tmp]#
2) Connect to bigboy via FTP
[root@smallfry tmp]# ftp 192.168.1.100
Connected to 192.168.1.100 (192.168.1.100)
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (192.168.1.100:root): user1
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
As expected, we can't do an upload transfer of testfile to bigboy.
ftp> put testfile
local: testfile remote: testfile
227 Entering Passive Mode (192,168,1,100,181,210)
553 Could not create file.
ftp>
But we can view and download a copy of the VSFTPD RPM located on the FTP server bigboy.
ftp> ls
227 Entering Passive Mode (192,168,1,100,35,173)
150 Here comes the directory listing.
-rwxr----- 1 0 502 76288 Jan 04 17:06 vsftpd-1.1.0-1.i386.rpm
226 Directory send OK.
ftp> get vsftpd-1.1.0-1.i386.rpm vsftpd-1.1.0-1.i386.rpm.tmp
local: vsftpd-1.1.0-1.i386.rpm.tmp remote: vsftpd-1.1.0-1.i386.rpm
227 Entering Passive Mode (192,168,1,100,44,156)
150 Opening BINARY mode data connection for vsftpd-1.1.0-1.i386.rpm (76288 bytes).
226 File send OK.
76288 bytes received in 0.499 secs (1.5e+02 Kbytes/sec)
ftp> exit
221 Goodbye.
[root@smallfry tmp]#
As expected, anonymous FTP fails.
[root@smallfry tmp]# ftp 192.168.1.100
Connected to 192.168.1.100 (192.168.1.100)
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (192.168.1.100:root): anonymous
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> quit
221 Goodbye.
[root@smallfry tmp]#
Now that testing is complete, you can make this a regular part of your FTP server's operation.
Conclusion
FTP is a very useful software application that can have enormous benefit to a Web site or to collaborative computing in which files need to be shared between business partners. Although insecure, it is universally accessible, because FTP clients are a part of all operating systems and Web browsers. If data encryption security is of great importance to you, then you should probably consider SCP as a possible alternative. You can find more information on it in Chapter 17, "Secure Remote Logins and File Copying".

Monday, October 20, 2008

Step-by-Step Guide to Software Installation and Maintenance


Software Installation and Maintenance for the Windows® 2000 operating system allows administrators to manage software for their organizations, including applications, service packs, and operating system upgrades. This overview guide explains how to use the Software Installation extension of the Group Policy Microsoft Management Console snap-in to specify policy settings for application deployment for groups of users and computers.

Introduction

This document is part of a set of step-by-step guides that introduce the Change and Configuration Management features of the Windows® 2000 operating system. This guide presents an overview of Software Installation and Maintenance. It also explains how to use the Software Installation extension of the Group Policy Microsoft Management Console snap-in to specify policy settings for application deployment for groups of users and computers.

Software Installation and Maintenance is dependent upon both the Active Directory and Group Policy. Administrators who are responsible for Software Installation and Maintenance should be familiar with both of these technologies.

Publish vs. Assign

Administrators can use Software Installation and Maintenance to either publish or assign software:

  • Publish. Administrators publish applications that users may find useful, allowing users to decide whether to install the application. You can only publish to users, not computers.

  • Assign. Administrators assign applications that users require to perform their jobs. Assigned applications are available on users' desktops automatically.

For a comparison of these capabilities, see Table 1 below. Administrators deploy applications in Group Policy objects (GPOs) that are associated with Active Directory containers such as sites, domains, and organizational units (OUs).

Table 1 Publishing and Assigning Software


Publish to Users

Assign to Users

Assign to Computers

After the administrator deploys the software, it is available for installation:

If an application is deployed in a GPO that is already applied to the user from a previous logon, it is available for installation in the current logon session (from the Add/Remove Programs Control Panel). If the application is deployed in a new GPO that is not already associated with the user, then it is available at the next logon.

If an application is deployed in a GPO that is already applied to the user from a previous logon, it is available for installation in the current logon session (from the Add/Remove Programs Control Panel). If the application is deployed in a new GPO that is not already associated with the user, then it is available at the next logon.

The next time the computer starts (reboot).

Typically, users install the software from:

The Add/Remove Programs in Control Panel.

Start menu shortcut.
Desktop shortcut.
Add/Remove Programs in Control Panel.

The software is already installed.

If the software is not installed and the user opens a file associated with the software, will the application install?

Yes.

Yes.

The software is already installed.

Can the users remove the software using the Add/Remove Programs in Control Panel?

Yes. Users can re-install the application from the Add/Remove Programs in Control Panel.

Yes. The software will be re-advertised immediately. This means that the shortcuts will be present in the users' desktops and they can re-install the application by clicking on a shortcut, for example.

No. Only the local administrator can remove the software. A user can run a repair on the software.

Supported installation file types:

Windows Installer packages (.msi files), and ZAP files.

Windows Installer packages (.msi files)

Windows Installer packages (.msi files)

Supported Installation File Types

Software Installation and Maintenance supports Windows Installer packages (.msi files), repackaged files, and .zap files.

A Windows Installer package (.msi file) contains all the information necessary to describe to the Windows Installer how to set up an application. It covers every conceivable situation: various platforms, different sets of previously installed products, earlier versions of a product, and numerous default installation locations. Some applications such as Office 2000 provide their own .msi files. These are referred to as natively-authored Windows Installer packages.

You can create Windows Installer packages for your applications by using package-authoring tools provided by various vendors such as InstallShield Software Corporation and WISE Solutions, Inc. See the section on Windows Installer Applications for more information.

You can also repackage an existing application for use with the Windows Installer. To create a package for the application, you use a repackaging tool such as the VERITAS WinInstall LE, described later in this document.

Non-Windows Installer-based applications must use a .zap file to describe their existing setup program. A .zap file is a text file (similar to .ini files) that provides information about how to install a program, the application properties, and the entry points that the application should install. A sample .zap file is included in the appendix - An Excel 97 .Zap File.

Wednesday, September 17, 2008

regsvr.exe (Microsoft Corparation) Virus




regsvr.exe / Winhelp.exe / rundll.exe / (Microsoft Corparation)

regsvr.exe / Winhelp.exe / rundll.exe
===========================

File names

———–

Name : regsvr.exe
Name : winhelp.exe
Type of File : Application
Icon : Folder icon
size : 1.06 MB (1,114,588 bytes)
size on disk : 1.07 MB (1,122,304 bytes)
File version : 1.1.2.2
Description : Microsoft Corparation (its Microsoft Corp’a'ration not Microsoft Corporation)
Copyright :
Compiled Script : Microsoft Corporation
File Verion : 1,1,2,2
Language : English (United Kingdom)

Name : rundll.exe
Type of File : Application
Description : Generic Host Process for Win32 Services
Size : 161 KB (164,864 bytes)
size on disk : 168 KB (172,032 bytes)
File version : 3.8.0.7400
Company : Microsoft Corporation
Internal name : svchost-full-org
Language : English (United States)
Original name : svchost-full-org.exe

other supporting files, created during installation ofvirus

Name : MSINET.OCX
Type : ActiveX Control
Size : 60.5 KB (61,952 bytes)
Size on disk : 64.0 KB (65,536 bytes)
File version : 5.1.45.11
Description : Microsoft Internet Transfer Control DLL
Copyright : Copyright © 1987-1997 Microsoft Corp.
Comments : September 11, 1997
Company : Microsoft Corporation
File version : 5.01.4511
Internal name : MSINET.OCX

Name : ijl11pro.dll
Type : Application Extension
Size : 70.0 KB (71,680 bytes)
six\ze on disk : 72.0 KB (73,728 bytes)
File version : 1.1.2.16
Description : Intel® JPEG Library - Retail Version
Copyright : Copyright © 1999
Comments : Intel® JPEG Library
Company : Intel Corporation
File version : 1.1.2
Internal name : Intel® JPEG Library
Original name : ijl11.dll

x—x—x

Recognized by KAV
—————–

not-a-virus:Monitor.Win32.007SpySoft.q rundll.exe
Worm.Win32.AutoIt.s regsvr.exe
x—x—x

Running Process
—————

regsvr.exe 1-30% 2 threads
rundll.exe 0% 4 threads
Winhelp.exe SYSTEM 1-40% 1 thread

x—x—x

Behind the Screen
—————–

Files Created:
…………..

I:\DOCUME~1\PIYUSH~1\LOCALS~1\Temp\aut3.tmp
I:\DOCUME~1\PIYUSH~1\LOCALS~1\Temp\aut4.tmp
I:\DOCUME~1\PIYUSH~1\LOCALS~1\Temp\aut5.tmp
I:\DOCUME~1\PIYUSH~1\LOCALS~1\Temp\aut6.tmp
I:\WINDOWS\winhelp.ini
I:\WINDOWS\system32\rundll.exe
I:\WINDOWS\system32\ijl11pro.dll
I:\WINDOWS\system32\MSINET.OCX
I:\WINDOWS\system32\regsvr.exe
I:\WINDOWS\regsvr.exe
I:\WINDOWS\system32\winhelp.exe
I:\Documents and Settings\Piyush Chandra\Local Settings\Temp\~DFD5E6.tmp
I:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
I:\WINDOWS\system32\COMCTL32.OCX
I:\WINDOWS\system32\stdole2.tlb
ModifyFile I:\WINDOWS\winhelp.ini

Regsitries changed:
……………….

ModifyRegValue \REGISTRY\USER\S-1-5-21-1935655697-308236825-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{79ebb8fd-f8e1-11dc-a1b1-806d6172696f}\BaseClass
etc
ModifyRegValue \REGISTRY\MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
CreateRegValue \REGISTRY\USER\S-1-5-21-1935655697-308236825-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Run\Yahoo Messengger
CreateRegValue \REGISTRY\USER\S-1-5-21-1935655697-308236825-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NofolderOptions
CreateRegValue \REGISTRY\USER\S-1-5-21-1935655697-308236825-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr
CreateRegValue \REGISTRY\USER\S-1-5-21-1935655697-308236825-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools
CreateRegValue \REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\Schedule\AtTaskMaxHours
ModifyRegValue \REGISTRY\MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\system
CreateDir C:\WINNT\system32\ssdata\
CreateDir C:\Recycled\WinLiveUpdate32\scrdata\
CreateDir C:\Recycled\WinLiveUpdate32\
CreateRegValue \REGISTRY\MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\User Themes
CreateRegKey \REGISTRY\MACHINE\SOFTWARE\Classes\TypeLib\{48E59290-9880-11CF-9754-00AA00C00908}
etc
CreateRegKey \REGISTRY\MACHINE\SOFTWARE\Classes\CLSID\{48E59293-9880-11CF-9754-00AA00C00908}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}
etc
CreateRegValue HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\User “I:\WINDOWS\system32\rundll.exe”

Registry access:
…………….

HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\SYSTEM\ControlSet001\Control\NetworkProvider\HwOrder
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
HKLM\SYSTEM\ControlSet001\Services\WinSock2\Parameters\
HKLM\SOFTWARE\Microsoft\Tracing\RASAPI32
HKLM\SYSTEM\ControlSet001\Services\Tcpip\Linkage
HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters
HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters\Interfaces
HKLM\SYSTEM\ControlSet001\Hardware Profiles001
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Network\Location Awareness

x—x—x

More behind the screen
———————-

The virus gets completely installed only after rebooting two times.

It uses cacls.exe to change some permission setting (not yet discovered)

It saves printscreen images in c:\recycled\WinLiveUpdate32\ at an interval of 30 seconds
so it eats up the space for your c:\ if u are affected by this virus for long time

It saves some processes goining on the system in c:recycled\WinLiveUpdate32\scrdata\ in files namely Apps.data, Files.dat, Keys.data, scr.data, lgstat.ini

In simple words: it keeps a complete track about you computer.

Apps.data
………

Piyush Chandra|||2008-03-26 19:05:18|||Run|||Kaspersky Anti-Virus 6.0
Piyush Chandra|||2008-03-26 19:05:21|||Run|||Protection
Piyush Chandra|||2008-03-26 19:05:32|||Close|||Protection
Piyush Chandra|||2008-03-26 19:05:34|||Close|||Kaspersky Anti-Virus 6.0
Piyush Chandra|||2008-03-26 19:05:37|||Run|||Windows Task Manager
Piyush Chandra|||2008-03-26 19:06:04|||Run|||My Documents
etc

Files.dat
………

Piyush Chandra|||2008-03-26 19:31:55|||Create Dir|||H:\MyDocs\virus collection\Known\regsvr.exe Worm.Win32.AutoIt.s\Virus\New Folder
Piyush Chandra|||2008-03-26 19:32:00|||Rename Dir|||H:\MyDocs\virus collection\Known\regsvr.exe Worm.Win32.AutoIt.s\Virus\New Folder—>H:\MyDocs\virus collection\Known\regsvr.exe Worm.Win32.AutoIt.s\Virus\recycler files

etc

Keys.data
………

Piyush Chandra|||2008-03-26 19:10:03|||StartupMonitor Warning
{Enter}

scr.data
……..

Piyush Chandra|||2008-03-26 19:06:15|||Proactive Defense Alert|||C:\Recycled\WinLiveUpdate32\scrdata\2008032668776.jpg
Piyush Chandra|||2008-03-26 19:06:45|||Process Explorer - Sysinternals: www.sysinternals.com [PIYUSH\Piyush Chandra]|||C:\Recycled\WinLiveUpdate32\scrdata\2008032668806.jpg
Piyush Chandra|||2008-03-26 19:07:16|||Process Explorer - Sysinternals: www.sysinternals.com [PIYUSH\Piyush Chandra]|||C:\Recycled\WinLiveUpdate32\scrdata\2008032668836.jpg
Piyush Chandra|||2008-03-26 19:07:46|||~DFBFCB.tmp - Notepad|||C:\Recycled\WinLiveUpdate32\scrdata\2008032668866.jpg
Piyush Chandra|||2008-03-26 19:08:16|||Player

etc

Wanrning Messages
—————–

rundll.exe
Another program is currently using this file.

Kaspersky
Riskware: not-a-virus:Monitor.Win32.007SpySoft.q
File: I:\WINDOWS\system32\rundll.exe

x—x—x

Solution:
———

Start > Run > type the following

(if you have a lappy, then copy taskkill.exe in your c:\windows\system32\ folder)

End task
……..

taskkill /f /im regsvr.exe /t
taskkill /f /im rundll.exe /t
taskkill /f /im winhelp.exe /t

Registries
……….

at /delete /yes
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /f
reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v “Yahoo Messengger” /f
reg delete HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run /v “Yahoo Messengger” /f
reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon” /v System /t REG_SZ /d “” /f
reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon” /v shell /t REG_SZ /d “Explorer.exe” /f
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run” /v “User Themes” /f

Files
…..

cmd /k del “%USERPROFILE%\Local Settings\Temp\aut*” /f
cmd /k del “%USERPROFILE%\Local Settings\Temp\~*” /f
cmd /k del “%WINDIR%\System32\rundll.exe” /f
cmd /k del “%WINDIR%\winhelp.ini” /f
cmd /k del “%WINDIR%\system32\ijl11pro.dll” /f
cmd /k del “%WINDIR%\system32\MSINET.OCX” /f
cmd /k del “%WINDIR%\system32\regsvr.exe” /f
cmd /k del “%WINDIR%\regsvr.exe” /f
cmd /k del “%WINDIR%\system32\winhelp.exe” /f
cmd /k del “C:\WINNT\system32\ssdata\”
cmd /k del “C:\Recycled\WinLiveUpdate32\scrdata\” /f /q
cmd /k del “C:\Recycled\WinLiveUpdate32\” /f /q
(and delete regsvr.exe, New Folder.exe and autorun.inf from pen drives)

Sunday, September 7, 2008

Why Google launched Chrome

Why Google launched Chrome

Google's launch Tuesday of its Chrome Web browser is seen as the search giant's latest assault on Microsoft (MSFT, Fortune 500). The company has been developing Chrome for two years, but the timing of its jump into the browser wars is probably no coincidence given two seemingly small features recently offered by the latest browsers from Microsoft and Mozilla.

Internet Explorer 8, Microsoft's most recent update to its browser, lets people navigate the Net while hiding their Internet address and viewing history - sometimes called "porn mode."

While this privacy feature isn't exactly new to the browsing world, it is the first time Microsoft has offered it. And given that Microsoft has 72% of the browser market, that move is seen as a significant threat to Google, which attempts to pinpoint its search results to a user's interests.

"Google Chrome is partly a defensive move as Microsoft is incorporating functionality in new browsers that may block the collection of ad targeting information," Stifel Nicolaus analyst George Askew wrote in a note Tuesday.

Blocking, tackling
For Google (GOOG, Fortune 500) and Microsoft, the browser is the virtual box office of Internet search revenue. Searches create hits and hits create context and ultimately clicks. This is the big money flow in Google's $16.5 billion annual revenue stream.

Getting blocked from user information is certainly a critical turn for the search industry, but a recent move by Mozilla's Firefox goes even further by circumventing the search process all together.

In Firefox, users type a Web address, or URL, in the address box. With each letter typed the browser offers to complete the process by showing a list of sites the person has visited that correspond with the fragment of the word. For example, you want to go to Wikipedia and your first suggested destinations are Weather.com or Nintendo's Wii.

Some analysts predict it's only a matter of time before this auto-complete feature is added to Internet Explorer.

Google has been working on a browser for about two years, but, according to analysts, the company hadn't felt compelled to introduce it to the world. It's telling, given the squeeze in the search business and the competitive moves by the two browser giants, that Google would bring out Chrome now

A fresh take on the browser

At Google, we have a saying: “launch early and iterate.” While this approach is usually limited to our engineers, it apparently applies to our mailroom as well! As you may have read in the blogosphere, we hit "send" a bit early on a comic book introducing our new open source browser, Google Chrome. As we believe in access to information for everyone, we've now made the comic publicly available -- you can find it here. We will be launching the beta version of Google Chrome tomorrow in more than 100 countries.

So why are we launching Google Chrome? Because we believe we can add value for users and, at the same time, help drive innovation on the web.

All of us at Google spend much of our time working inside a browser. We search, chat, email and collaborate in a browser. And in our spare time, we shop, bank, read news and keep in touch with friends -- all using a browser. Because we spend so much time online, we began seriously thinking about what kind of browser could exist if we started from scratch and built on the best elements out there. We realized that the web had evolved from mainly simple text pages to rich, interactive applications and that we needed to completely rethink the browser. What we really needed was not just a browser, but also a modern platform for web pages and applications, and that's what we set out to build.

On the surface, we designed a browser window that is streamlined and simple. To most people, it isn't the browser that matters. It's only a tool to run the important stuff -- the pages, sites and applications that make up the web. Like the classic Google homepage, Google Chrome is clean and fast. It gets out of your way and gets you where you want to go.

Under the hood, we were able to build the foundation of a browser that runs today's complex web applications much better. By keeping each tab in an isolated "sandbox", we were able to prevent one tab from crashing another and provide improved protection from rogue sites. We improved speed and responsiveness across the board. We also built a more powerful JavaScript engine, V8, to power the next generation of web applications that aren't even possible in today's browsers.

This is just the beginning -- Google Chrome is far from done. We're releasing this beta for Windows to start the broader discussion and hear from you as quickly as possible. We're hard at work building versions for Mac and Linux too, and will continue to make it even faster and more robust.

We owe a great debt to many open source projects, and we're committed to continuing on their path. We've used components from Apple's WebKit and Mozilla's Firefox, among others -- and in that spirit, we are making all of our code open source as well. We hope to collaborate with the entire community to help drive the web forward.

The web gets better with more options and innovation. Google Chrome is another option, and we hope it contributes to making the web even better.

So check in again tomorrow to try Google Chrome for yourself. We'll post an update here as soon as it's ready.

Saturday, September 6, 2008

Myth about WPA ( How it is done ), Windows Product Activation Technique

A German computer magazine has found weaknesses in the piracy protection system built into Windows XP.

The weaknesses could mean that in up to 90% of cases users can circumvent the copy protection system.

But Microsoft said that the protection system would be much stronger and harder to defeat when the final version of XP is released later this year.

Component count

In a bid to combat piracy Microsoft is introducing a product activation system into the XP versions of its software. Activating a product involves contacting Microsoft for an identification number that is then combined with the serial numbers of the components inside your computer to create a unique identifier.



it would be possible to 'activate' nearly 90 percent of home-user machines without Microsoft knowing anything about it

Mike Hartmann, Tec Channel
Big changes to the hardware in a machine could mean that users have to contact Microsoft for a new identification number to re-activate their software.

By tying software to individual machines Microsoft hopes to stop its products being run on more machines than they are licensed for.

But now German computer magazine Tec Channel has analysed the product activation system that is being used in the test, or beta, versions of Windows XP and found that, in many cases, it can be compromised by making simple changes.

File fiddling

When Windows XP is first installed and activated it generates a file called wpa.dbl that stores information about the configuration of your machine.

Changes to any one of the ten components or serial numbers that this file watches are logged. When three changes have been made the wpa.dbl file is deleted forcing the user to contact Microsoft to reactivate the software.

But Mike Hartmann, a journalist at Tec Channel, has found that the ability of the wpa file to spot piracy can be easily compromised.

In tests Mr Hartmann installed and activated XP, then saved a version of the wpa file that was generated. He then changed components on the test machine so XP had to be re-activated. However, copying the old version of the wpa file back in the Windows system directory stopped requests for reactivation.

Piracy problems

The activation was also compromised when XP was fooled into thinking that a desktop PC was a laptop in a docking station, rather than a self-contained machine. In this configuration some components that wpa watches would be in the docking station rather than the portable computer. XP dutifully ignored any changes made to these components.

XP activation items
network card address
graphics card ID number
CPU serial number
SCSI host adapter number
IDE controller number
hard disk serial number
CPU type
Ram size
Volume ID
CD-Rom serial number

In total Mr Hartmann found a way to make the Windows XP activation technology ignore six of the ten components that it monitors. Mr Hartmann said another two can vary in only a small number of ways among all machines making it possible to create a "universal" wpa file that should activate XP on most PCs.

"With some smart tools that do automatic matching of hardware and activation-files it would be possible to 'activate' nearly 90 percent of home-user machines without Microsoft knowing anything about it," Mr Hartmann told BBC News Online.

Mr Hartmann expects to see activation file sites springing up on the web that offer wpa files tied to PCs with particular configurations thus ruining Microsoft's chances of cutting piracy.

"Should Microsoft stick with current version of wpa they will have wasted lots of money for call-center-employees, webservers and the technology itself," he said.

But a spokeswoman for Microsoft said that the version of the activation system that is in the pre-release versions of Windows XP is weaker than that which will ship with the finished version.

"The things that have been highlighted as a way of potentially bypassing activation will not be in the final code," said the spokeswoman. "The final code is going to be very different to what we have now."

"Product activation is not completely fixed in place at this time," she added.


Hacking WindowsXP Product Activation

Basic Issues

The file wpa.dbl in the directory system32 contains information on the system at the time of the Activation. If more than three hardware components are changed, Windows XP will notice it and delete wpa.dbl. With that the user shall be forced to activate XP anew. You do not get another 30 days of time, though, to activate again (in RC1 it is a fortnight). Instead XP takes the date of the installation as a basis. That means you have to activate immediately to run XP again, if the installation took place 30 days ago.

Volume serial number of the system volumes (displayed with dir-command)
MAC address of the network card (displayed with netstat -r -n)
Identification string of the CD ROM drive
Identification string of the displays
CPU serial number
Identification string of the system's hard disk
Identification string of the SCSI host adapter
Identification string of the IDE controller
String of the processor model
RAM size
1 = docking station, 0 = without docking station

First Tests

For a beginning we first of all saved the file wpa.dbl and then replaced the graphics card and the network card. As expected Windows XP was cooperative, so we could work without any disturbance. The first surprise showed up as we replaced the Celeron with a Pentium III: Suddenly Windows XP wanted to activate anew although we only changed three components.
The answer to the riddle is to be found in the serial number of the processor. Replacing the processor did not only change one but already changed two pieces of hardware information. For us that means to restart the computer and to switch off the serial number in the BIOS. Nonetheless XP insists on the Activation. A glance at wpa.dbl shows the reason why: Apparently XP put the file back in a non-activated condition. We again restart the computer, boot into DOS and copy the saved wpa.dbl back into the system directory of XP. With the next start of XP, the demand for Activation has disappeared. Evidently, wpa.dbl is the central authority to decide whether or not Activation already took place.

We re-install Windows XP on our computer from the ground up, using the very same product key. Nevertheless, the computer gets another product ID, as the last three digits are generated randomly. Although the product ID changed, Windows can be activated by copying the saved file wpa.dbl into the appropriate directory. Our next try brings an even bigger surprise: The Activation still works although we use a completely new product key for the installation.

Forged Hardware

These results kept in the back of our minds we try to activate Windows XP on another computer by copying the file wpa.dbl. First of all we adapt the volume ID of the new computer by means of freeware tools. The command line volumeid c: 3333-3333 changes the corresponding coefficient of the new system: The first component of Microsoft's protection is canceled.

With some network cards it is possible to adjust the MAC manually by means of the driver. The corresponding option in the register Advanced is called "Network Address" or "Locally administered Network Address".

So meanwhile we succeeded in switching off two components of the Activation by pretending another network address to the new system. The CPU serial number is switched off anyway, both computers do not have a SCSI host adapter and the memory is of the same size with both of them. With that altogether five sections of the hardware ID are identical.
Six actually, for both computers are not "to be docked". The latter gives us a bold plan...
Notebook of Eight Kilogrammes

What would happen if we tell the operating system that the computer is a notebook? This option can be toggled in the hardware profile of the device manager.

Can Microsoft be tricked that easily? Yes it can! After the next restart of the computer the analysis of the installation ID makes clear that suddenly the graphics card and the IDE/SCSI controller are no longer used to calculate the hardware ID.
So only three more differences in the configuration of the hardware remain:

Identification of the hard disk
Identification of the CPU
Identification of the CD-ROM drive

Because these three components are allowed to be different without XP insisting on a new Activation, this should be sufficient. So we copy the file wpa.dbl into the system32 directory of the second computer and start Windows XP. In the start menu it still says "Activate Windows". But when you call it up, you get your just reward though:

Windows XP enlists ten hardware components to calculate the installation ID, but six of them can be canceled without any problems:

Component To be canceled by
Volume ID Adapted by means of tool
MAC address Tuned by means of driver
Graphics card Switch over to docking station
CPU serial number Switch off in BIOS
SCSI host adapter Switch over to docking station
IDE controller Switch over to docking station

Important: A LAN does not tolerate two computers with the same MAC address.

Only four components are working almost effectively:

Component Size of bit field

Hard disk 7
CPU type 3
CD ROM 7
RAM size 3

Two fields are coded with three bits and two with seven bits. Because in each field the coefficient 0 is impossible, 7*7*127*127=790321 possibilities remain for the file wpa.dbl. As only three components are allowed to change from the moment of Activation onwards, you can take the weakest fixed component for a "Universal Activation".

The CPU type or the RAM size present themselves here as the best solution. It is more than sufficient to only once activate a computer with 128 MBytes of RAM at Microsoft's. With its file wpa.dbl you can then "activate" all other computers of the same memory size.

Conclusion

With its technology of Activation Microsoft wants to thwart the user who occasionally copies software. Up to a certain degree this may still work. But by means of the above described steps nearly everybody can activate his own XP merely by getting a corresponding wpa.dbl file. There certainly will exist some web sites in the near future where the user can comfortably download "his"wpa.dbl.

Should the current procedure of Activation remain, then Microsoft will spend a lot of money like water for technology, web servers and call centers without any considerable success. It would be much more lucrative to drop the Activation and to lower the price for XP.

Microsoft did not comment on the weak points of the Activation until now. But probably their statement goes as follows: "In its final version WPA will look completely different. We did not implement these steps in the RC1 for only one reason, that is not to annoy the testers."

But it definitely is a fact that in-between the Release Candidates and the real Release normally only bugs are rectified. May sharp tongues call the WPA itself a bug, in our opinion it is nothing more but an example of bad programming.


Inside Windows Product Activation

A Fully Licensed Paper

July 2001

Fully Licensed GmbH, Rudower Chaussee 29, 12489 Berlin, Germany

ht*p://www.licenturion.com


>> INTRODUCTION

The current public discussion of Windows Product Activation (WPA) is
characterized by uncertainty and speculation. In this paper we supply
the technical details of WPA - as implemented in Windows XP - that
Microsoft should have published long ago.

While we strongly believe that every software vendor has the right to
enforce the licensing terms governing the use of a piece of licensed
software by technical means, we also do believe that each individual
has the right to detailed knowledge about the full implications of the
employed means and possible limitations imposed by it on software
usage.

In this paper we answer what we think are currently the two most
important open questions related to Windows Product Activation.

* Exactly what information is transmitted during activation?

* How do hardware modifications affect an already activated
installation of Windows XP?

Our answers to these questions are based on Windows XP Release
Candidate 1 (build 2505). Later builds as well as the final version of
Windows XP might differ from build 2505, e.g. in the employed
cryptographic keys or the layout of some of the data
structures.

However, beyond such minor modifications we expect Microsoft to cling
to the general architecture of their activation mechanism. Thus, we
are convinced that the answers provided by this paper will still be
useful when the final version of Windows XP ships.

This paper supplies in-depth technical information about the inner
workings of WPA. Still, the discussion is a little vague at some
points in order not to facilitate the task of an attacker attempting
to circumvent the license enforcement supplied by the activation
mechanism.

XPDec, a command line utility suitable for verifying the presented
information, can be obtained from http://www.licenturion.com/xp/. It
implements the algorithms presented in this paper. Reading its source
code, which is available from the same location, is highly
recommended.

We have removed an important cryptographic key from the XPDec source
code. Recompiling the source code will thus fail to produce a working
executable. The XPDec executable on our website, however, contains
this key and is fully functional.

So, download the source code to learn about the inner workings of WPA,
but obtain the executable to experiment with your installation of
Windows XP.

We expect the reader to be familiar with the general procedure of
Windows Product Activation.

>> INSIDE THE INSTALLATION ID

We focused our research on product activation via telephone. We did
so, because we expected this variant of activation to be the most
straight-forward to analyze.

The first step in activating Windows XP via telephone is supplying the
call-center agent with the Installation ID displayed by msoobe.exe,
the application that guides a user through the activation process. The
Installation ID is a number consisting of 50 decimal digits that are
divided into groups of six digits each, as in

002666-077894-484890-114573-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XX

In this authentic Installation ID we have substituted digits that we
prefer not to disclose by 'X' characters.

If msoobe.exe is invoked more than once, it provides a different
Installation ID each time.

In return, the call-center agent provides a Confirmation ID matching
the given Installation ID. Entering the Confirmation ID completes the
activation process.

Since the Installation ID is the only piece of information revealed
during activation, the above question concerning the information
transmitted during the activation process is equivalent to the
question

'How is the Installation ID generated?'

To find an answer to this question, we trace back each digit of the
Installation ID to its origins.

>>> Check digits

The rightmost digit in each of the groups is a check digit to guard
against simple errors such as the call center agent's mistyping of one
of the digits read to him or her. The value of the check digit is
calculated by adding the other five digits in the group, adding the
digits at even positions a second time, and dividing the sum by
seven. The remainder of the division is the value of the check
digit. In the above example the check digit for the first group (6) is
calculated as follows.

1 | 2 | 3 | 4 | 5 <- position ---+---+---+---+--- 0 | 0 | 2 | 6 | 6 <- digits 0 + 0 + 2 + 6 + 6 = 14 (step 1: add all digits) 0 + 6 + 14 = 20 (step 2: add even digits again) step 3: division 20 / 7 = 2, remainder is 20 - (2 * 7) = 6 => check digit is 6

Adding the even digits twice is probably intended to guard against the
relatively frequent error of accidentally swapping two digits while
typing, as in 00626 vs. 00266, which yield different check digits.

>>> Decoding

Removing the check digits results in a 41-digit decimal number. A
decimal number of this length roughly corresponds to a 136-bit binary
number. In fact, the 41-digit number is just the decimal encoding of
such a 136-bit multi-precision integer, which is stored in little
endian byte order as a byte array. Hence, the above Installation ID
can also be represented as a sequence of 17 bytes as in

0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX
0x94 0xAA 0x46 0xD6 0x0F 0xBD 0x2C 0xC8
0x00

In this representation of the above Installation ID 'X' characters
again substitute the digits that we prefer not to disclose. The '0x'
prefix denotes hex notation throughout this paper.

>>> Decryption

When decoding arbitrary Installation IDs it can be noticed that the
most significant byte always seems to be 0x00 or 0x01, whereas the
other bytes look random. The reason for this is that the lower 16
bytes of the Installation ID are encrypted, whereas the most
significant byte is kept in plaintext.

The cryptographic algorithm employed to encrypt the Installation ID is
a proprietary four-round Feistel cipher. Since the block of input
bytes passed to a Feistel cipher is divided into two blocks of equal
size, this class of ciphers is typically applied to input blocks
consisting of an even number of bytes - in this case the lower 16 of
the 17 input bytes. The round function of the cipher is the SHA-1
message digest algorithm keyed with a four-byte sequence.

Let + denote the concatenation of two byte sequences, ^ the XOR
operation, L and R the left and right eight-byte input half for one
round, L' and R' the output halves of said round, and First-8() a
function that returns the first eight bytes of an SHA-1 message
digest. Then one round of decryption looks as follows.

L' = R ^ First-8(SHA-1(L + Key))
R' = L

The result of the decryption is 16 bytes of plaintext, which are -
together with the 17th unencrypted byte - from now on interpreted as
four double words in little endian byte order followed by a single
byte as in

name | size | offset
-----+-------------+-------
H1 | double word | 0
H2 | double word | 4
P1 | double word | 8
P2 | double word | 12
P3 | byte | 16

H1 and H2 specify the hardware configuration that the Installation ID
is linked to. P1 and P2 as well as the remaining byte P3 contain the
Product ID associated with the Installation ID.

>>> Product ID

The Product ID consists of five groups of decimal digits, as in

AAAAA-BBB-CCCCCCC-DDEEE

If you search your registry for a value named 'ProductID', you will
discover the ID that applies to your installation. The 'About' window
of Internet Explorer should also yield your Product ID.

>>>> Decoding

The mapping between the Product ID in decimal representation and its
binary encoding in the double words P1 and P2 and the byte P3 is
summarized in the following table.

digits | length | encoding
--------+---------+---------------------------------------
AAAAA | 17 bits | bit 0 to bit 16 of P1
BBB | 10 bits | bit 17 to bit 26 of P1
CCCCCCC | 28 bits | bit 27 to bit 31 of P1 (lower 5 bits)
| | bit 0 to bit 22 of P2 (upper 23 bits)
DDEEE | 17 bits | bit 23 to bit 31 of P2 (lower 9 bits)
| | bit 0 to bit 7 of P3 (upper 8 bits)

The meaning of each of the five groups of digits is documented in the
next table.

digits | meaning
--------+-------------------------------------------------
AAAAA | apparently always 55034 (in Windows XP RC1)
BBB | most significant three digits of Raw Product Key
| (see below)
CCCCCCC | least significant six digits of Raw Product Key
| plus check digit (see below)
DD | index of the public key used to verify the
| Product Key (see below)
EEE | random value

As can be seen, the (Raw) Product Key plays an important role in
generating the Product ID.

>>>> Product Key

The Raw Product Key is buried inside the Product Key that is printed
on the sticker distributed with each Windows XP CD. It consists of
five alphanumeric strings separated by '-' characters, where each
string is composed of five characters, as in

FFFFF-GGGGG-HHHHH-JJJJJ-KKKKK

Each character is one of the following 24 letters and digits:

B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9

Very similar to the decimal encoding of the Installation ID the 25
characters of the Product Key form a base-24 encoding of the binary
representation of the Product Key. Decoding the Product Key yields a
multi-precision integer of roughly 115 bits, which is stored - again
in little endian byte order - in an array of 15 bytes. Decoding the
above Product Key results in the following byte sequence.

0x6F 0xFA 0x95 0x45 0xFC 0x75 0xB5 0x52
0xBB 0xEF 0xB1 0x17 0xDA 0xCD 0x00

Of these 15 bytes the least significant four bytes contain the Raw
Product Key in little endian byte order. The least significant bit is
removed by shifting this 32-bit value (0x4595FA6F - remember the
little endian byte order) to the left by one bit position, resulting
in a Raw Product Key of 0x22CAFD37, or

583728439

in decimal notation.

The eleven remaining bytes form a digital signature, allowing
verification of the authenticity of the Product Key by means of a
hard-coded public key.

>>>> Product Key -> Product ID

The three most significant digits, i.e. 583, of the Raw Product Key's
nine-digit decimal representation directly map to the BBB component of
the Product ID described above.

To obtain the CCCCCCC component, a check digit is appended to the
remaining six digits 728439. The check digit is chosen such that the
sum of all digits - including the check digit - is divisible by
seven. In the given case, the sum of the six digits is

7 + 2 + 8 + 4 + 3 + 9 = 33

which results in a check digit of 2, since

7 + 2 + 8 + 4 + 3 + 9 + 2 = 33 + 2 = 35

which is divisible by seven. The CCCCCCC component of the Product ID
is therefore 7284392.

For verifying a Product Key, more than one public key is available. If
verification with the first public key fails, the second is tried,
etc. The DD component of the Product ID specifies which of the public
keys in this sequence was successfully used to verify the Product Key.

This mechanism might be intended to support several different parties
generating valid Product Keys with different individual private keys.

However, the different private keys might also represent different
versions of a product. A Product Key for the 'professional' release
could then be signed with a different key than a Product Key for the
'server' release. The DD component would then represent the product
version.

Finally, a valid Product ID derived from our example Product Key might
be

55034-583-7284392-00123

which indicates that the first public key (DD = index = 0) matched and
123 was chosen as the random number EEE.

The randomly selected EEE component is the reason for msoobe.exe
presenting a different Installation ID at each invocation. Because of
the applied encryption this small change results in a completely
different Installation ID.

So, the Product ID transmitted during activation will most probably
differ in the last three digits from your Product ID as displayed by
Internet Explorer or as stored in the registry.

>>> Hardware Information

As discussed above, the hardware configuration linked to the
Installation ID is represented by the two double words H1 and H2.

>>>> Bit-fields

For this purpose, the double words are divided into twelve
bit-fields. The relationship between the computer hardware and the
bit-fields is given in the following table.

double word | offset | length | bit-field value based on
------------+--------+--------+----------------------------
H1 | 0 | 10 | volume serial number string
| | | of system volume
H1 | 10 | 10 | network adapter MAC address
| | | string
H1 | 20 | 7 | CD-ROM drive hardware
| | | identification string
H1 | 27 | 5 | graphics adapter hardware
| | | identification string
H2 | 0 | 3 | unused, set to 001
H2 | 3 | 6 | CPU serial number string
H2 | 9 | 7 | harddrive hardware
| | | identification string
H2 | 16 | 5 | SCSI host adapter hardware
| | | identification string
H2 | 21 | 4 | IDE controller hardware
| | | identification string
H2 | 25 | 3 | processor model string
H2 | 28 | 3 | RAM size
H2 | 31 | 1 | 1 = dockable
| | | 0 = not dockable

Bit 31 of H2 specifies, whether the bit-fields represent a notebook
computer that supports a docking station. If docking is possible, the
activation mechanism will be more tolerant with respect to future
hardware modifications. Here, the idea is that plugging a notebook
into its docking station possibly results in changes to its hardware
configuration, e.g. a SCSI host adapter built into the docking station
may become available.

Bits 2 through 0 of H2 are unused and always set to 001.

If the hardware component corresponding to one of the remaining ten
bit-fields is present, the respective bit-field contains a non-zero
value describing the component. A value of zero marks the hardware
component as not present.

All hardware components are identified by a hardware identification
string obtained from the registry. Hashing this string provides the
value for the corresponding bit-field.

>>>> Hashing

The hash result is obtained by feeding the hardware identification
string into the MD5 message digest algorithm and picking the number of
bits required for a bit-field from predetermined locations in the
resulting message digest. Different predetermined locations are used
for different bit-fields. In addition, a hash result of zero is
avoided by calculating

Hash = (Hash % BitFieldMax) + 1

where BitFieldMax is the maximal value that may be stored in the
bit-field in question, e.g. 1023 for a 10-bit bit-field, and 'x % y'
denotes the remainder of the division of x by y. This results in
values between 1 and BitFieldMax. The obtained value is then stored in
the respective bit-field.

>>>> RAM bit-field

The bit-field related to the amount of RAM available to the operating
system is calculated differently. The seven valid values specify the
approximate amount of available RAM as documented in the following
table.

value | amount of RAM available
------+---------------------------
0 | (bit-field unused)
1 | below 32 MB
2 | between 32 MB and 63 MB
3 | between 64 MB and 127 MB
4 | between 128 MB and 255 MB
5 | between 256 MB and 511 MB
6 | between 512 MB and 1023 MB
7 | above 1023 MB

It is important to note that the amount of RAM is retrieved by calling
the GlobalMemoryStatus() function, which reports a few hundred
kilobytes less than the amount of RAM physically installed. So, 128 MB
of RAM would typically be classified as "between 64 MB and 127 MB".

>>>> Real-world example

Let us have a look at a real-world example. On one of our test systems
the hardware information consists of the following eight bytes.

0xC5 0x95 0x12 0xAC 0x01 0x6E 0x2C 0x32

Converting the bytes into H1 and H2, we obtain

H1 = 0xAC1295C5 and H2 = 0x322C6E01

Splitting H1 and H2 yields the next table in which we give the value
of each of the bit-fields and the information from which each value is
derived.

dw & | |
offset | value | derived from
-------+-------+-----------------------------------------------
H1 0 | 0x1C5 | '1234-ABCD'
H1 10 | 0x0A5 | '00C0DF089E44'
H1 20 | 0x37 | 'SCSI\CDROMPLEXTOR_CD-ROM_PX-32TS__1.01'
H1 27 | 0x15 | 'PCI\VEN_102B&DEV_0519&SUBSYS_00000000&REV_01'
H2 0 | 0x1 | (unused, always 0x1)
H2 3 | 0x00 | (CPU serial number not present)
H2 9 | 0x37 | 'SCSI\DISKIBM_____DCAS-34330______S65A'
H2 16 | 0x0C | 'PCI\VEN_9004&DEV_7178&SUBSYS_00000000&REV_03'
H2 21 | 0x1 | 'PCI\VEN_8086&DEV_7111&SUBSYS_00000000&REV_01'
H2 25 | 0x1 | 'GenuineIntel Family 6 Model 3'
H2 28 | 0x3 | (system has 128 MB of RAM)
H2 31 | 0x0 | (system is not dockable)

>>> Using XPDec

XPDec is a utility to be run from the command prompt. It may be
invoked with one of four command line options to carry out one of four
tasks.

>>>> XPDec -i

This option enables you to access the information hidden in an
Installation ID. It decodes the Installation ID, decrypts it, and
displays the values of the hardware bit-fields as well as the Product
ID of your product. Keep in mind that the last three digits of the
Product ID contained in the Installation ID are randomly selected and
differ from the Product ID displayed by Internet Explorer.

The only argument needed for the '-i' option is the Installation ID,
as in

XPDec -i 002666-077894-484890-114573-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XX

>>>> XPDec -p

To help you trace the origin of your Product ID, this option decodes a
Product Key and displays the Raw Product Key as it would be used in a
Product ID.

The only argument needed for the '-p' option is the Product Key, as in

XPDec -p FFFFF-GGGGG-HHHHH-JJJJJ-KKKKK

Note that this option does not verify the digital signature of the
Product Key.

>>>> XPDec -v

This option calculates the hash of a given volume serial number. It
was implemented to illustrate our description of string hashing. First
use '-i' to display the hardware bit-fields. Then use this option to
verify our claims concerning the volume serial number hash.

The only argument needed for the '-v' option is the volume serial
number of your system volume, as in

XPDec -v 1234-ABCD

(The volume serial number is part of the 'dir' command's output.)

>>>> XPDec -m

This option calculates the network adapter bit-field value
corresponding to the given MAC address. Similar to '-v' this option
was implemented as a proof of concept.

The only argument needed for the '-m' option is the MAC address of
your network adapter, as in

XPDec -m 00-C0-DF-08-9E-44

(Use the 'route print' command to obtain the MAC address of your
network adapter.)

>> HARDWARE MODIFICATIONS

When looking at the effects of hardware modifications on an already
activated installation of Windows XP, the file 'wpa.dbl' in the
'system32' directory plays a central role. It is a simple
RC4-encrypted database that stores, among other things like expiration
information and the Confirmation ID of an activated installation,

a) the bit-field values representing the current hardware
configuration,

and

the bit-field values representing the hardware configuration
at the time of product activation.

While a) is automatically updated each time the hardware configuration
is modified in order to reflect the changes, remains fixed. Hence,
can be thought of as a snapshot of the hardware configuration at
the time of product activation.

This snapshot does not exist in the database before product activation
and if we compare the size of 'wpa.dbl' before and after activation,
we will notice an increased file size. This is because the snapshot is
added to the database.

When judging whether re-activation is necessary, the bit-field values
of a) are compared to the bit-field values of , i.e. the current
hardware configuration is compared to the hardware configuration at
the time of activation.

>>> Non-dockable computer

Typically all bit-fields with the exception of the unused field and
the 'dockable' field are compared. If more than three of these ten
bit-fields have changed in a) since product activation, re-activation
is required.

This means, for example, that in our above real-world example, we
could replace the harddrive and the CD-ROM drive and substantially
upgrade our RAM without having to re-activate our Windows XP
installation.

However, if we completely re-installed Windows XP, the information in
would be lost and we would have to re-activate our installation,
even if we had not changed our hardware.

>>> Dockable computer

If bit 31 of H2 indicates that our computer supports a docking
station, however, only seven of the ten bit-fields mentioned above are
compared. The bit-fields corresponding to the SCSI host adapter, the
IDE controller, and the graphics board are omitted. But again, of
these remaining seven bit-fields, only up to three may change without
requiring re-activation.

>> CONCLUSIONS

In this paper we have given a technical overview of Windows Product
Activation as implemented in Windows XP. We have shown what
information the data transmitted during product activation is derived
from and how hardware upgrades affect an already activated
installation.

Looking at the technical details of WPA, we do not think that it is as
problematic as many people have expected. We think so, because WPA is
tolerant with respect to hardware modifications. In addition, it is
likely that more than one hardware component map to a certain value
for a given bit-field. From the above real-world example we know that
the PX-32TS maps to the value 0x37 = 55. But there are probably many
other CD-ROM drives that map to the same value. Hence, it is
impossible to tell from the bit-field value whether it is a PX-32TS
that we are using or one of the other drives that map to the same
value.

In contrast to many critics of Windows Product Activation, we think
that WPA does not prevent typical hardware modifications and,
moreover, respects the user's right to privacy.

>> ABOUT THE AUTHORS

Fully Licensed GmbH is a start-up company focusing on novel approaches
to online software licensing and distribution. Have a look at their
website at

http://www.licenturion.com

for more information.

Their research branch every now and then analyzes licensing solutions
implemented by other companies.

>> COPYRIGHT

Copyright © 2001 Fully Licensed GmbH (www.licenturion.com)
All rights reserved.

You are free to do whatever you want with this paper. However, you
have to supply the URL of its online version

http://www.licenturion.com/xp/

with any work derived from this paper to give credit to its authors.

>>
>> Frequently asked questions and their answers
>> concerning the Fully Licensed WPA paper
>>
>> Fully Licensed GmbH, July 10, 2001
>>

>> 1. Was Microsoft involved in the creation of the paper?

Microsoft was not involved in the creation of the paper in any
way. However, we made a draft version available to Microsoft to give
them a head-start. We consider it to be good etiquette to inform a
vendor of a pending publication related to one his or her products, so
that the vendor is able to prepare an official response.

>> 2. Why should we believe you?

We do not expect you to believe us. That's why we have provided our
complete knowledge about WPA and the XPDec utility. Combine both to
verify our claims.

>> 3. But Thomas Lopatic, one of your managing directors was born in
Unterschleissheim, Germany, which is the town near Munich in
which Microsoft's European headquarters are located.

This is a nice coincidence. It is in a way understandable - and at the
same time highly amusing to us :-) - that this has given rise to
rumors about the whole paper being a cleverly planned Microsoft
conspiracy.

Thomas was actually born in Karlsruhe, Germany. However, he was living
in Unterschleissheim from the 1970s - i.e. long before Microsoft moved
there - until recently, when he moved to Berlin. That's why some
records still list Unterschleissheim as the place where he
lives. Incorrectly interpreting these records led to the rumor that
Thomas was born in Unterschleissheim.

>> 4. Does Microsoft downplay the paper?

No, most definitely not. The paper really IS harmless. It does not
provide any information that would help a pirate circumvent WPA.

>> 5. Why did you release details on Windows Product Activation?

We felt that there is a need for facts in the debate about Windows
Product Activation. Many people suspected that WPA could be abused to
spy on end-users. Our paper, however, shows that insensitive
information is transmitted during product activation. From this, it
can be seen that the facts that we provide really are a necessary
contribution to the ongoing discussion about WPA.

We think that license enforcement mechanisms will be an important part
of the future of software distribution via the Internet. Thus, we do
think that public discussion of technology of this kind must be free
from bias and it must be based on facts and openness.

We hope that the information that we provide positively affects the
current debate. The debate is necessary, but it should be based on
facts and full disclosure of information relevant to the privacy
question.

>> 6. Do you know how to circumvent Windows Product Activation?

No. We provide insight into which information is transmitted to
Microsoft during activation. Our paper is important to help people
understand the impact of WPA on their work and their privacy. We do
not believe that our paper helps in any way to circumvent the license
enforcement provided by WPA.

>> 7. Your paper says that Microsoft will err on the user's side.

What our paper shows is that a) no sensitive information is
transferred to Microsoft and typical hardware upgrades do not
negatively affect an already activated installation of Windows XP.

But, if you either completely re-install Windows XP or modify your
hardware beyond what is tolerated by product activation, you have to
re-activate Windows XP.

The important question now is: How often will Microsoft let you
re-activate? Erring on the user's side would mean that they allow you
to re-activate as often as you like, which seems to be what Microsoft
says they will do.

It is, however, impossible to confirm this policy by means of a
technical analysis.

>> 8. Why doesn't Microsoft know which hardware I use?

Let us consider the case of IDE controllers. In the installation ID
transmitted to Microsoft they are represented by a 4-bit value. The 4
bits are obtained by applying the MD5 message digest algorithm to a
string that uniquely identifies the vendor and model of the IDE
controller, e.g.

'PCI\VEN_8086&DEV_7111&SUBSYS_00000000&REV_01'

and picking 4 bits from fixed locations in the resulting 128-bit
message digest.

With 4 bits, we can represent 16 different values at maximum. However,
there are far more than 16 different models of IDE controllers out
there. So, since there are more models than 4-bit values, the above
hashing procedure must yield the same 4 bits for more than one
model. The more models there are, the more models will map to a given
4-bit value.

In contrast to what Microsoft says, the privacy that WPA provides is
not based on the assumption that it is impossible to invert the
employed message digest algorithm, i.e. MD5. If we used all 128 bits
of the message digest derived from a hardware component's
identification string, this 128-bit value would most probably uniquely
identify the hardware component. If we used 128 bits, each hardware
component on earth would probably map to a different value.

What an attacker would then do is build a list of all hardware
components on this planet and calculate the corresponding 128-bit
values, which are probably all different. Then finding the hardware
component that corresponds to a certain 128-bit value is just a table
lookup away.

Privacy is based on the fact that only a few bits of the resulting
128-bit message digest are considered. Obviously this leads to lots of
collisions, i.e. lots of hardware components mapping to a given
value. If there were 160 different models of IDE controllers, we could
on average expect 160 / 16 = 10 models to map to the same 4-bit value.

Let us, as another example, consider the MAC address of an ethernet
adapter. The discussion is technically not 100% accurate, but it
illustrates the point. The MAC address is a 48-bit value, which means
that it can theoretically be one of 281,474,976,710,656 different
values. However, its 10-bit representation in the Installation ID is
obtained by picking 10 bits from the MD5 hash over an ASCII string
comprised of the 12 hex digits of the 48-bit value. Picking 10 bits
leads to 1,024 different results at maximum.

So, on average, we expect

281,474,976,710,656 / 1,024 = 274,877,906,944

MAC addresses to map to the same 10-bit value. Because of this, nobody
will be able to obtain the actual MAC address from the 10-bit value,
since there are 274,877,906,944 candidate MAC addresses from which the
10-bit value could have been derived.

It is interesting to see that the bit-field that represents the MAC
address is 10 bits in size, while the bit-field representing the IDE
controller only consists of 4 bits. Microsoft probably have assigned a
longer bit-field to a component if they expect more diversity in the
identification string of this component. The number of different IDE
controller models is smaller by orders of magnitude than the number of
different MAC addresses. So, to produce sufficient collisions, they
decided to use a relatively small bit-field for IDE controllers but
could still afford to chose a 10-bit bit-field in the case of MAC
addresses.

>> 9. What are the implications of re-activating after hardware
changes?

This is an interesting issue which is not covered in our paper. We
simply did not think of it. Our mistake. It was brought to our
attention by an article by Greg Falcon on
www.slashdot.org: If you have to re-activate your installation of
Windows XP because of hardware modifications, your new hardware
configuration is embedded in the Installation ID in the form discussed
above. While this does not enable anyone to find out which components
you have, it is trivial to find out which components you have
changed. Just examine which bit-fields have changed their value since
the original activation.


--------------------------------------------
"Windows XP enlists ten hardware components to calculate the installation
ID, but six of them can be canceled without any problems:

Volume ID ---------- Adapted by means of tool
MAC address -------- Tuned by means of driver
Graphics card -------Switch over to docking station
CPU serial number - Switch off in BIOS
SCSI host adapter -- Switch over to docking station
IDE controller ------- Switch over to docking station

Important: A LAN does not tolerate two computers with the same MAC address.
"
-----------------------------------------
(Switching to 'Docking Station' in Device Manager / Performance / File
System settings doesn't mean you actually have a docking station of any kind
so can be used for non-notebook computers that cannot even USE a docking
station!)

If you want WindowsXP on a network, you're stuck (until someone finds
another route around Activation - juding by the speed of this one, that
won't be long!) But then why would anyone want more than one copy of Windoze
XP on a LAN anyway!
---------------------------------------------
"It is more than sufficient to only once activate a computer with 128 MBytes
of RAM. With its file wpa.dbl you can then "activate" all other computers of
the same memory size." [no matter what other hardware is installed as long
as it's set as a notebook and the volume tag etc is set to match].

"Can Microsoft be tricked that easily? Yes it can! After the next restart of
the computer [after changing to docking station] the analysis of the
installation ID makes clear that suddenly the graphics card and the IDE/SCSI
controller are no longer used to calculate the hardware ID. In computers
that can be docked, XP ignores the identification of the graphics card, the
SCSI host adapter and the IDE controller.

So only three more differences in the configuration of the hardware remain:

Identification of the hard disk
Identification of the CPU
Identification of the CD-ROM drive

Because these three components are allowed to be different without XP
insisting on a new Activation, this should be sufficient. So we copy the
file wpa.dbl into the system32 directory of the second computer and start
Windows XP. In the start menu it still says "Activate Windows". But when you
call it up, you get your just reward though:
"Windows Product Activation: Windows is already activated. Click OK to
exit."

"So first of all Tecchannel saved the file then started changing hardware.
Two items OK, but replacing a third - the CPU - triggered the deletion.
Although you'd think the CPU is only one component, it's actually tallied up
as two. Switching off the CPU serial number in the bios and therefore
knocking it down to one doesn't get the earlier wpa.dbl back - this has been
restored in a non-activated state.

Copy the saved version back? That surely shouldn't work - but it does. Next,
Tecchannel tried a completely new installation using the same product key.
This produces a new product ID, but nevertheless copying the wpa.dbl file
back again works.

They also use this file on another computer, altering the computer's volume
ID first, which is easily enough done. They can also use forged network
cards MAC addresses, so now they've taken two parts of the hardware ID out
of the picture. Next, use the hardware profile to tell the computer it's a
notebook with a docking station. This works, and tells WPA to stop counting
the IDE/SCSI controller and the graphics card.

That gets the differences counted down to three, hard disk, CPU and CDROM
ID, which is within the limit, so WPA is effectively toast.

What does this mean? Tecchannel's investigation shows that, at the very
least, you can use the same wpa.dbl file to activate as many computers as
you like, provided the RAM size is the same. A 'universal' file that didn't
even require the same RAM might be a possibility, but it's more likely that
people will simply swap files to get one appropriate for their hardware. "


Hope it enlights some of us to create a unique keygen just to get the confirmation ID generated after putting the Installation ID on the same.

Enjoy!!